Returns a info mutator
338097
def getInfoMutator(self):
        
        if self._infoMutator:
            return self._infoMutator
        infoItems = []
        for sourceDescriptor in self.sources:
            if sourceDescriptor.layerName is not None:
                continue
            loc = Location(sourceDescriptor.location)
            sourceFont = self.fonts[sourceDescriptor.name]
            if sourceFont is None:
                continue
            if hasattr(sourceFont.info, "toMathInfo"):
                infoItems.append((loc, sourceFont.info.toMathInfo()))
            else:
                infoItems.append((loc, self.mathInfoClass(sourceFont.info)))
        bias, self._infoMutator = self.getVariationModel(infoItems, axes=self.serializedAxes, bias=self.newDefaultLocation())
        return self._infoMutator
1201019
private Biomorph mutateBiomorph(Biomorph biomorph, Random rng)
    {
        int[] genes = biomorph.getGenotype();
        assert genes.length == Biomorph.GENE_COUNT : "Biomorphs must have " + Biomorph.GENE_COUNT + " genes.";
        for (int i = 0; i < Biomorph.GENE_COUNT - 1; i++)
        {
            if (mutationProbability.nextEvent(rng))
            {
                boolean increase = rng.nextBoolean();
                genes[i] += (increase ? 1 : -1);
                if (genes[i] > Biomorph.GENE_MAX)
                {
                    genes[i] = Biomorph.GENE_MIN;
                }
                else if (genes[i] < Biomorph.GENE_MIN)
                {
                    genes[i] = Biomorph.GENE_MAX;
                }
            }
        }
        boolean increase = rng.nextBoolean();
        genes[Biomorph.LENGTH_GENE_INDEX] += (increase ? 1 : -1);
        if (genes[Biomorph.LENGTH_GENE_INDEX] > Biomorph.LENGTH_GENE_MAX)
        {
            genes[Biomorph.LENGTH_GENE_INDEX] = Biomorph.LENGTH_GENE_MIN;
        }
        else if (genes[Biomorph.LENGTH_GENE_INDEX] < Biomorph.LENGTH_GENE_MIN)
        {
            genes[Biomorph.LENGTH_GENE_INDEX] = Biomorph.LENGTH_GENE_MAX;
        }
        return new Biomorph(genes);
    }
338135
def coerce(cls, key, value):
        """"""
        if not isinstance(value, MutationDict):
            if isinstance(value, dict):
                return MutationDict(value)

            # this call will raise ValueError
            return Mutable.coerce(key, value)
        else:
            return value
999699
static synchronized Mutator mutatorFor(Class<?> type, Method method, Configuration configuration,
      String name) {
    PropertyInfoKey key = new PropertyInfoKey(type, name, configuration);
    Mutator mutator = MUTATOR_CACHE.get(key);
    if (mutator == null) {
      mutator = new MethodMutator(type, method, name);
      MUTATOR_CACHE.put(key, mutator);
    }

    return mutator;
  }
1223508
def __get_genestr(self, itemid):
        """"""
        if self.id2symbol is not None:
            symbol = self.id2symbol.get(itemid, None)
            if symbol is not None:
                return symbol
        if isinstance(itemid, int):
            return str(itemid)
        return itemid
66499
def info(version=nil, &block)
      if version.nil?
        if block_given?
          @global_info.instance_eval(&block)
        else
          @global_info
        end
      else
        i = @infos[version]
        if block_given?
          i.instance_eval(&block)
        end
        i
      end
    end
314711
function getInfo(hash) {
  const info = getHashInfo(hash);
  const algo = getAlgorithmFromId(info.id);
  info.algorithm = algo.name;
  info.options = algo.getOptions(hash, info);

  return info;
}
896501
def mutable(function):
    ''''''

    def wrapper(self, *args, **kwargs):
        state = self._get_state()
        return function(self, state, *args, **kwargs)

    return wrapper
266249
def _get_genestr(self, itemid):
        """"""
        if itemid in self.id2symbol:
            symbol = self.id2symbol[itemid]
            if symbol is not None:
                return symbol
        if isinstance(itemid, int):
            return str(itemid)
        return itemid
989091
function simple_removers (removers) {
        // loop over the setter keys and make a mutation for each
        return Object.keys(removers).reduce(function (mutations, name) {

            // attach our new mutation to result
            return Object.assign({}, mutations, defineProperty({}, name, function (state, removeVal) {
                var mutationName = removers[name];

                // if the target has a dot, remove our value from the nested array
                if (mutationName.indexOf('.') > -1) {
                    var obj = removers[name].split('.');
                    var key = obj.pop();
                    var parentObj = resolveObjectPath(state, obj);

                    // dev errors
                    if (process.env.NODE_ENV !== 'production') {
                        // target path must resolve to an array
                        if (!parentObj || typeof parentObj[key] === 'undefined') {
                            error('simpleRemover mutation failed, target "' + mutationName + '" is undefined.');
                        } else if (!Array.isArray(parentObj[key])) {
                            error('simpleRemover mutation failed, target "' + mutationName + '" is not an array, ' + _typeof(parentObj[key]) + ' found.');
                        }
                    }

                    parentObj[key] = parentObj[key].filter(function (val) {
                        return val !== removeVal;
                    });
                }

                // otherwise, just remove our value from the array
                else {
                        // dev errors
                        if (process.env.NODE_ENV !== 'production') {
                            // target must be an array
                            if (typeof state[mutationName] === 'undefined') {
                                error('simpleRemover mutation failed, target "' + mutationName + '" is undefined.');
                            } else if (!Array.isArray(state[mutationName])) {
                                error('simpleRemover mutation failed, target "' + mutationName + '" is not an array, ' + _typeof(state[mutationName]) + ' found.');
                            }
                        }

                        state[removers[name]] = state[removers[name]].filter(function (val) {
                            return val !== removeVal;
                        });
                    }
            }));
        }, {});
    }
775123
def does_not_mutate(func):
    """"""
    def wrapper(self, *args, **kwargs):
        new = self.copy()
        return func(new, *args, **kwargs)
    wrapper.__name__ = func.__name__
    wrapper.__doc__ = func.__doc__
    return wrapper
670574
function getTypeInfo (obj, info) {
  const constructorName = _.constructorName(obj)
  const _info = info || {
    type: null,
    name: null,
    isList: false,
    isNonNull: false
  }

  switch (constructorName) {
    case 'GraphQLNonNull':
      _info.isNonNull = true
      return getTypeInfo(obj.ofType, _info)
    case 'GraphQLList':
      _info.isList = true
      return getTypeInfo(obj.ofType, _info)
    default:
      _info.type = obj
      _info.name = obj.name
  }
  return _info
}
974333
function(info) {
                    this.types['.' + info.suffix] = info;

                    // _removed if not used as a steal module_



                    can[info.suffix] = $view[info.suffix] = function(id, text) {
                        // If there is no text, assume id is the template text, so return a nameless renderer.
                        if (!text) {
                            // if the template has a fragRenderer already, just return that.
                            if (info.fragRenderer) {
                                return info.fragRenderer(null, id);
                            } else {
                                return makeRenderer(info.renderer(null, id));
                            }

                        }
                        if (info.fragRenderer) {
                            return $view.preload(id, info.fragRenderer(id, text));
                        } else {
                            return $view.preloadStringRenderer(id, info.renderer(id, text));
                        }

                    };

                }
134900
function mutateJsonFile(targetPath, source, mutator) {
  if (!mutator) {
    mutator = source;
    source = null;
  }
  let sourceConfig = source;
  try {
    // console.log('targetPath', targetPath);

    let targetConfig = readJson(targetPath);

    // console.log('source', source);
    if (typeof source === 'string') {
      sourceConfig = readJson(source);
    }
    // console.log('sourceConfig', targetPath, sourceConfig)
    sourceConfig = sourceConfig ? sourceConfig : targetConfig;

    let newConfig = mutator(targetConfig, sourceConfig);

    writeJson(targetPath, newConfig, {spaces: 2});

  } catch (e) {
    log.error('Error: operating on aurelia.json. Reverting to previous version ;{}', e);
    writeJson(targetPath, sourceConfig, {spaces: 2});
  }
}
71352
def info(cls, name, get_state=True, get_pid=True):
        """"""
        # Run lxc-info quietly
        command = ['lxc-info', '-n', name]
        response = subwrap.run(command)
        lines = map(split_info_line, response.std_out.splitlines())
        return dict(lines)
208730
def info(name, root=None):
    '''
    
    '''
    if root is not None:
        getspnam = functools.partial(_getspnam, root=root)
    else:
        getspnam = functools.partial(spwd.getspnam)

    try:
        data = getspnam(name)
        ret = {
            'name': data.sp_namp if hasattr(data, 'sp_namp') else data.sp_nam,
            'passwd': data.sp_pwdp if hasattr(data, 'sp_pwdp') else data.sp_pwd,
            'lstchg': data.sp_lstchg,
            'min': data.sp_min,
            'max': data.sp_max,
            'warn': data.sp_warn,
            'inact': data.sp_inact,
            'expire': data.sp_expire}
    except KeyError:
        return {
            'name': '',
            'passwd': '',
            'lstchg': '',
            'min': '',
            'max': '',
            'warn': '',
            'inact': '',
            'expire': ''}
    return ret
369738
def info_check(*args, func=None):
    """"""
    from pcapkit.corekit.infoclass import Info

    func = func or inspect.stack()[2][3]
    for var in args:
        if not isinstance(var, Info):
            name = type(var).__name__
            raise InfoError(
                f'Function {func} expected Info instance, {name} got instead.')