Returns a function that will map names/labels, dependent if mapper
    is a dict, Series or just a function.
971245
def _get_rename_function(mapper):
    
    if isinstance(mapper, (abc.Mapping, ABCSeries)):

        def f(x):
            if x in mapper:
                return mapper[x]
            else:
                return x
    else:
        f = mapper

    return f
446345
def _get_dsnames(cls, data, ignore_keys=['attrs', 'plotter', 'ds'],
                     concat_dim=False):
        """"""
        def filter_ignores(item):
            return item[0] not in ignore_keys and isinstance(item[1], dict)
        if 'fname' in data:
            return {tuple(
                [data['fname'], data['store']] +
                ([data.get('concat_dim')] if concat_dim else []))}
        return set(chain(*map(partial(cls._get_dsnames, concat_dim=concat_dim,
                                      ignore_keys=ignore_keys),
                              dict(filter(filter_ignores,
                                          six.iteritems(data))).values())))
228364
def _map_in_out(self, inside_var_name):
        """"""
        for out_name, in_name in self.outside_name_map.items():
            if inside_var_name == in_name:
                return out_name
        return None
529237
def map(self, mapper: Callable[[Any], Any]) -> 'Observable':
        
        """
        source = self
        return Observable(lambda on_next: source.subscribe(compose(on_next, mapper)))
1003472
def functions(self):
        
        names = []

        for i, k in enumerate(self.obj):
            if _(self.obj[k]).isCallable():
                names.append(k)

        return self._wrap(sorted(names))
176925
def make_mapping(args):
    """"""
    mapping = {}

    if args:
        for arg in args:
            name_value = arg.split('=', 1)
            mapping[name_value[0]] = (name_value[1]
                                      if len(name_value) > 1
                                      else None)

    return mapping
1144150
def get_label_cls(self, labels, label_cls:Callable=None, label_delim:str=None, **kwargs):
        ""
        if label_cls is not None:               return label_cls
        if self.label_cls is not None:          return self.label_cls
        if label_delim is not None:             return MultiCategoryList
        it = index_row(labels,0)
        if isinstance(it, (float, np.float32)): return FloatList
        if isinstance(try_int(it), (str, Integral)):  return CategoryList
        if isinstance(it, Collection):          return MultiCategoryList
        return ItemList
207753
def recursive_map(func, data):
    
    def recurse(item):
        return recursive_map(func, item)
    items_mapped = map_collection(recurse, data)
    return func(items_mapped)
1102260
function remapLoadRecord(load, mapFunction) {
    load = extend({}, load);
    load.name = mapFunction(load.name, load.name);
    var depMap = {};
    Object.keys(load.depMap).forEach(function(dep) {
      depMap[dep] = mapFunction(load.depMap[dep], dep);
    });
    load.depMap = depMap;
    return load;
  }
937940
def _namedtuplify(mapping):
    
    if isinstance(mapping, collections.Mapping):
        for key, value in list(mapping.items()):
            mapping[key] = _namedtuplify(value)
        try:
            mapping.pop('__name__')
        except KeyError:
            pass
        # return collections.namedtuple('settingsa', dict(**mapping))(**mapping)
        return _MutableNamedTuple(mapping)
    return _parse(mapping)
839146
def map2x(func, *iterables):
    """"""
    zipped = zip_longest(*iterables)
    if func is None:
        return zipped
    return starmap(func, zipped)
711496
function keyMapper(mapper) {
  return obj => {
    if (!isObject(obj) || Array.isArray(obj)) {
      return obj;
    }

    const keys = Object.keys(obj);
    const out = {};

    for (let i = 0, l = keys.length; i < l; ++i) {
      const key = keys[i];
      out[mapper(key)] = obj[key];
    }

    return out;
  };
}
742520
def _get_name_map(saltenv='base'):
    '''
    
    '''
    u_name_map = {}
    name_map = get_repo_data(saltenv).get('name_map', {})

    if not six.PY2:
        return name_map

    for k in name_map:
        u_name_map[k] = name_map[k]
    return u_name_map
1013264
def derive_mapper_from_collection(collection)
      if m = collection.first
        name = "#{m.class.name.split('::').last}CollectionMapper"
        begin
          return @options[:namespace].const_get(name)
        rescue NameError               # rubocop:disable Lint/HandleExceptions
        end
      end
      begin
        return @options[:namespace].const_get(:CollectionMapper)
      rescue NameError                 # rubocop:disable Lint/HandleExceptions
      end
      CollectionMapper
    end
1032250
def _mapper(self):
        
        return {
            'card': Payment.Card,
            'customer': Payment.Customer,
            'hosted_payment': Payment.HostedPayment,
            'notification': Payment.Notification,
            'failure': Payment.Failure,
        }
864595
def _get_mapper(self, mapper_name):
        

        if mapper_name in self._datamappers:
            # mapper found
            return self._datamappers[mapper_name]
        else:
            # unsupported format
            return self._unknown_format(mapper_name)
1371124
def map(self, fn: Callable[[Any], Any]) -> 'Reader':
        
        """
        def _compose(x: Any) -> Any:
            try:
                ret = fn(self.run(x))
            except TypeError:
                ret = partial(fn, self.run(x))
            return ret
        return Reader(_compose)