Override the units on the underlying variable.
438052
def units(self, val):
        """"""
        if isinstance(val, units.Unit):
            self._unit = val
        else:
            self._unit = units(val)
862958
public void setUnitType(com.google.api.ads.admanager.axis.v201811.GrpUnitType unitType) {
        this.unitType = unitType;
    }
1076525
def __set_unit_price(self, value):
        '''
        
        '''
        try:
            if value < 0:
                raise ValueError()

            self.__unit_price = Decimal(str(value))
        except ValueError:
            raise ValueError("Unit Price must be a positive number")
475836
def unit_value(self, value):
        

        if isinstance(value, TimeUnit):
            self._unit = value
        else:
            self._unit = TimeUnit(value)
857719
def declare_units(out_units, **units_by_name):
    """"""

    def dec(func):
        # Match the signature of the function to the arguments given to the decorator
        sig = signature(func)
        bound_units = sig.bind_partial(**units_by_name)

        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            # Match all passed in value to their proper arguments so we can check units
            bound_args = sig.bind(*args, **kwargs)
            for name, val in bound_args.arguments.items():
                _check_units(val, bound_units.arguments.get(name, None))

            out = func(*args, **kwargs)

            # In the generic case, we use the default units that should have been propagated by the computation.
            if '[' in out_units:
                _check_units(out, out_units)

            # Otherwise, we specify explicitly the units.
            else:
                out.attrs['units'] = out_units
            return out

        return wrapper

    return dec
367652
def set_default_unit_all(self, twig=None, unit=None, **kwargs):
        
        if twig is not None and unit is None:
            # then try to support value as the first argument if no matches with twigs
            if isinstance(unit, u.Unit) or not isinstance(twig, str):
                unit = twig
                twig = None

            elif not len(self.filter(twig=twig, check_default=check_default, **kwargs)):
                unit = twig
                twig = None

        for param in self.filter(twig=twig, **kwargs).to_list():
            param.set_default_unit(unit)
229109
def clone(self, **override_vars):
        """"""
        c = Context(self.vars, self.data)
        c.executed_actions = set(self.executed_actions)
        c.vars.update(override_vars)
        return c
479565
def convert_unit(self, column, value):
        ""
        if column not in self.units:
            return value

        # Try to interpret the value as a unit
        value = self.ureg(value)
        if isinstance(value, numbers.Number):
            # It's just a bare number, assume it's the column unit
            return value

        column_unit = self.ureg(self.units[column])
        return value.to(column_unit).magnitude
1197172
def _normalize_unit(cls, unit):
        
        if unit in cls.UNITS_IN_SECONDS:
            return unit
        return cls.UNIT_ALIASES_REVERSE.get(unit, None)
235894
public void overrideSetting(String name, int value) {
        overrides.put(name, Integer.toString(value));
    }
913832
public function set_units( $units = [] ) {
		$this->data['units'] = Strings::maybe_split_parameters( $units );
		$this->custom_units  = $this->update_unit_pattern( $this->data['units'] );
	}
1214234
def set(self, value):
    """"""
    if self.is_value_set:
      # While we want to *allow* re-setting previously set measurements, we'd
      # rather promote the use of multidimensional measurements instead of
      # discarding data, so we make this somewhat chatty.
      _LOG.warning(
          'Overriding previous measurement %s value of %s with %s, the old '
          'value will be lost.  Use a dimensioned measurement if you need to '
          'save multiple values.', self.name, self.stored_value, value)
    if value is None:
      _LOG.warning('Measurement %s is set to None', self.name)
    self.stored_value = value
    self._cached_value = data.convert_to_base_types(value)
    self.is_value_set = True
550704
protected function overrideEnvironmentVariables()
    {
        if (!isset($this->options->filtered['configuration'])) {
            return;
        }

        $variables = $this->options->filtered['configuration']->getEnvironmentVariables();

        foreach ($variables as $key => $value) {
            putenv(sprintf('%s=%s', $key, $value));

            $_ENV[$key] = $value;
        }
    }
1059536
public void setNormalizedUnit(String v) {
    if (Measure_Type.featOkTst && ((Measure_Type)jcasType).casFeat_normalizedUnit == null)
      jcasType.jcas.throwFeatMissing("normalizedUnit", "ch.epfl.bbp.uima.types.Measure");
    jcasType.ll_cas.ll_setStringValue(addr, ((Measure_Type)jcasType).casFeatCode_normalizedUnit, v);}
40226
def units(cls, scale=1):
        '''
        

        '''
        return [cls(x=scale), cls(y=scale), cls(z=scale)]
148044
def replace_variable(self, variable):
        """"""
        if variable == 'x':
            return self.value
        if variable == 't':
            return self.timedelta
        raise ValueError("Invalid variable %s", variable)
1075610
def convert_units(self, from_units, to_units):
        '''
        

        '''
        from blmath import units
        factor = units.factor(
            from_units=from_units,
            to_units=to_units,
            units_class='length'
        )
        self.scale(factor)