List of dicts of native values <- List of dicts of primitive datatypes.
502689
def to_internal_value(self, data):
        
        if html.is_html_input(data):
            data = html.parse_html_list(data)
        if isinstance(data, type('')) or isinstance(data, collections.Mapping) or not hasattr(data, '__iter__'):
            self.fail('not_a_list', input_type=type(data).__name__)
        if not self.allow_empty and len(data) == 0:
            self.fail('empty')
        return [self.child.run_validation(item) for item in data]
794709
def unmarshall(values):
    
    unmarshalled = {}
    for key in values:
        unmarshalled[key] = _unmarshall_dict(values[key])
    return unmarshalled
74470
def values(self) -> typing.Dict[str, str]:
        """"""
        return {k: v for k, v in self._items if v is not None}
1223072
def _get_dtype_maps():
    
    
    # Define pairs
    tmp = [ (np.float32, 'MET_FLOAT'),  (np.float64, 'MET_DOUBLE'),
            (np.uint8, 'MET_UCHAR'),    (np.int8, 'MET_CHAR'),
            (np.uint16, 'MET_USHORT'),  (np.int16, 'MET_SHORT'),
            (np.uint32, 'MET_UINT'),    (np.int32, 'MET_INT'),
            (np.uint64, 'MET_ULONG'),   (np.int64, 'MET_LONG') ]
    
    # Create dictionaries
    map1, map2 = {}, {}
    for np_type, itk_type in tmp:
        map1[np_type.__name__] = itk_type
        map2[itk_type] = np_type.__name__
    
    # Done
    return map1, map2
1292914
def _to_key_val_pairs(defs):
    

    if isinstance(defs, STRING_TYPES):
        # Convert 'a' to [('a', None)], or 'a.b.c' to [('a', 'b.c')]
        return [defs.split('.', 1) if '.' in defs else (defs, None)]
    else:
        pairs = []

        # Convert collections of strings or lists as above; break dicts into component items
        pairs.extend(p for s in defs if isinstance(s, STRING_TYPES) for p in _to_key_val_pairs(s))
        pairs.extend(p for l in defs if isinstance(l, list) for p in _to_key_val_pairs(l))
        pairs.extend(p for d in defs if isinstance(d, dict) for p in iteritems(d))

        return pairs
525217
def values(self, key_type=None):
        
        if(key_type is not None):
            all_items = {} # in order to preserve keys() type (dict_values for python3) 
            keys_used = set()
            direct_key = str(key_type)
            if direct_key in self.__dict__:
                for intermediate_key in self.__dict__[direct_key].values():
                    if not intermediate_key in keys_used:
                        all_items[intermediate_key] = self.items_dict[intermediate_key]
                        keys_used.add(intermediate_key)
            return all_items.values()
        else:
            return self.items_dict.values()
586544
def itervalues(d, **kw):
    """"""
    if not PY2:
        return iter(d.values(**kw))
    return d.itervalues(**kw)
273209
def values(self):
        
        return [
            (
                np.array(dim.numeric_values)
                if (dim.numeric_values and any(~np.isnan(dim.numeric_values)))
                else None
            )
            for dim in self._slice.dimensions
        ]
776625
def dict_map(f, primitive, dic):
    """"""

    if primitive(dic):
        return f(dic)
    if isinstance(dic, Mapping):
        return {dict_map(f, primitive, key): dict_map(f, primitive, value)
                for key, value in dic.items()}
    if isinstance(dic, str):
        return dic
    if isinstance(dic, Sequence):
        return [dict_map(f, primitive, value) for value in dic]
    return dic
381189
def to_primitive(self, value, context=None):
        

        if context and context.get('rel_ids'):
            return value.rid
        else:
            return {'rtype': value.rtype, 'rid': value.rid}
381033
def _asdict(self):
    """"""
    # Start with any default values we have, and override with loaded values,
    # and then override with flag values.
    retval = {key: self._declarations[key].default_value for
              key in self._declarations if self._declarations[key].has_default}
    retval.update(self._loaded_values)
    # Only update keys that are declared so we don't allow injecting
    # un-declared keys via commandline flags.
    for key, value in self._modules['six'].iteritems(self._flag_values):
      if key in self._declarations:
        retval[key] = value
    return retval
298410
def keys_values(self):
        """"""
        keys_values = []
        for value in self.keys.values():
            if isinstance(value, list):
                keys_values += value
            elif isinstance(value, basestring) and not value.startswith('-'):
                # Avoid -99. Should be fixed in geozones
                keys_values.append(value)
            elif isinstance(value, int) and value >= 0:
                # Avoid -99. Should be fixed in geozones
                keys_values.append(str(value))
        return keys_values
262074
def native(s, encoding='utf-8', fallback='iso-8859-1'):
    """"""

    if isinstance(s, str):
        return s

    if str is unicode:  # Python 3.x ->
        return unicodestr(s, encoding, fallback)

    return bytestring(s, encoding, fallback)
954511
def visit_DictComp(self, node: ast.DictComp) -> None:
        """"""
        if node in self._recomputed_values:
            value = self._recomputed_values[node]
            text = self._atok.get_text(node)

            self.reprs[text] = value

        self.generic_visit(node=node)
1098619
def native(self, value, context=None):
		""""""
		
		separator = self.separator.strip() if self.strip and hasattr(self.separator, 'strip') else self.separator
		value = super().native(value, context)
		
		if value is None:
			return self.cast()
		
		if hasattr(value, 'split'):
			value = value.split(separator)
		
		value = self._clean(value)
		
		try:
			return self.cast(value) if self.cast else value
		except Exception as e:
			raise Concern("{0} caught, failed to perform array transform: {1}", e.__class__.__name__, str(e))
768936
def native(self, value, context=None):
		""""""
		
		if self.strip and hasattr(value, 'strip'):
			value = value.strip()
		
		if self.none and value == '':
			return None
		
		if self.encoding and isinstance(value, bytes):
			return value.decode(self.encoding)
		
		return value
1242968
def values(self):
        ""
        return (list(self._pb.IntMap.values()) + list(self._pb.StringMap.values()) +
                list(self._pb.FloatMap.values()) + list(self._pb.BoolMap.values()))