Following the definition in the values definition.
        Her the data-list for every keyword
        retreived with the DataTree module is validated and linked to keywords
        A dict is return
189639
def link_values(self, linkdata):
        
        def get_variable(vdef, key):
            varid = vdef[1][0]
            if  varid >= len(linkdata):
                self.warn('Requested datavalue "%s" does not exist in: %s'% (varid, linkdata), dtLinkWarning, 2)
                return

            # remove any leading or trailing spaces on a string/unicode value
            value = linkdata[varid] if (not  isinstance(linkdata[varid], (unicode, str))) else unicode(linkdata[varid]).strip()
            return process_extras(value, vdef, key)

        def process_link_function(vdef, key):
            funcid = vdef[1][0]
            default = vdef[self.dtc.linkPos[self.dtc.linkhasDefault]]
            # Process the datavalues given for the function
            data = []
            for fd in vdef[1][1]:
                lact = fd[0] & self.dtc.linkGroup
                if lact == self.dtc.linkVarID:
                    data.append(get_variable(fd, key))

                elif lact == self.dtc.linkFuncID:
                    data.append(process_link_function(fd, key))

                elif lact == self.dtc.linkValue:
                    data.append(fd[1])

            # And call the linkfunction
            value = self.link_functions(funcid, data, default)
            if value in self.empty_values:
                return None

            return process_extras(value, vdef, key)

        def process_extras(value, vdef, key):
            if not value in self.empty_values:
                if vdef[0] & self.dtc.linkhasRegex and isinstance(value, (str, unicode)):
                    search_regex = vdef[self.dtc.linkPos[self.dtc.linkhasRegex]]
                    try:
                        dd = re.search(search_regex, value, re.DOTALL)
                        if dd.group(1) not in ('', None):
                            value = dd.group(1)

                        else:
                            self.warn('Regex "%s" in: %s returned no value on "%s"'% \
                                (search_regex, vdef, value), dtLinkWarning, 4)
                            value = None

                    except:
                        self.warn('Invalid value "%s" or invalid regex "%s" in: %s'% \
                            (value, search_regex, vdef), dtLinkWarning, 4)
                        value = None

                if vdef[0] & self.dtc.linkhasType:
                    dtype = vdef[self.dtc.linkPos[self.dtc.linkhasType]]
                    try:
                        if dtype == self.dtc.typeString:
                            value = unicode(value)

                        elif dtype == self.dtc.typeLower:
                            value = unicode(value).lower()

                        elif dtype == self.dtc.typeUpper:
                            value = unicode(value).upper()

                        elif dtype == self.dtc.typeCapitalize:
                            value = unicode(value).capitalize()

                        elif dtype == self.dtc.typeInteger:
                            value = int(value)

                        elif dtype == self.dtc.typeFloat:
                            value = float(value)

                        elif dtype == self.dtc.typeBoolean:
                            value = bool(value)

                    except:
                        vtype = {
                                self.dtc.typeString: "String",
                                self.dtc.typeLower: "LowerCase",
                                self.dtc.typeUpper: "UpperCase",
                                self.dtc.typeCapitalize: "Capitalize",
                                self.dtc.typeInteger: "Integer",
                                self.dtc.typeFloat: "Float",
                                self.dtc.typeBoolean: "Boolean"}
                        self.warn('Error on applying type "%s" on "%s"'% (vtype[dtype], value), dtLinkWarning, 4)
                        value = None

                if vdef[0] & self.dtc.linkhasCalc:
                    for cv in vdef[self.dtc.linkPos[self.dtc.linkhasCalc]]:
                        if cv[0] == self.dtc.calcMultiply:
                            try:
                                if not isinstance(value, (int, float)):
                                    value = float(value)
                                value = value * cv[1]

                            except:
                                self.warn('Error on applying multiplier "%s" on "%s"'% \
                                    (cv[1], value), dtLinkWarning, 4)

                        if cv[0] == self.dtc.calcDivide:
                            try:
                                if not isinstance(value, (int, float)):
                                    value = float(value)
                                value = value / cv[1]

                            except:
                                self.warn('Error on applying divider "%s" on "%s"'% \
                                    (cv[1], value), dtLinkWarning, 4)

                if vdef[0] & self.dtc.linkhasMax:
                    if isinstance(value, (str, unicode, list, dict)) and len(value) > vdef[self.dtc.linkPos[self.dtc.linkhasMax]]:
                        self.warn('Requested datavalue "%s" is longer then %s'% \
                            (key, vdef[self.dtc.linkPos[self.dtc.linkhasMax]]), dtLinkWarning, 4)
                        value = None

                    if isinstance(value, (int, float)) and value > vdef[self.dtc.linkPos[self.dtc.linkhasMax]]:
                        self.warn('Requested datavalue "%s" is bigger then %s'% \
                            (key, vdef[self.dtc.linkPos[self.dtc.linkhasMax]]), dtLinkWarning, 4)
                        value = None

                if vdef[0] & self.dtc.linkhasMin:
                    if isinstance(value, (str, unicode, list, dict)) and len(value) < vdef[self.dtc.linkPos[self.dtc.linkhasMin]]:
                        self.warn('Requested datavalue "%s" is shorter then %s'% \
                            (key, vdef[self.dtc.linkPos[self.dtc.linkhasMin]]), dtLinkWarning, 4)
                        value = None

                    if isinstance(value, (int, float)) and value < vdef[self.dtc.linkPos[self.dtc.linkhasMin]]:
                        self.warn('Requested datavalue "%s" is smaller then %s'% \
                            (key, vdef[self.dtc.linkPos[self.dtc.linkhasMin]]), dtLinkWarning, 4)
                        value = None

            if value in self.empty_values:
                return vdef[self.dtc.linkPos[self.dtc.linkhasDefault]]

            return value

        values = {}
        if isinstance(linkdata, list):
            for k, v in self.data_def["values"].items():
                lact = v[0] & self.dtc.linkGroup
                cval = None
                if lact == self.dtc.linkVarID:
                    cval = get_variable(v, k)

                elif lact == self.dtc.linkFuncID:
                    cval = process_link_function(v, k)

                elif lact == self.dtc.linkValue:
                    cval = v[1]

                if not cval in self.empty_values:
                    values[k] = cval

                elif not v[self.dtc.linkPos[self.dtc.linkhasDefault]] in self.empty_values:
                    values[k] = v[self.dtc.linkPos[self.dtc.linkhasDefault]]
        else:
            self.warn('No valid data "%s" to link with' % (linkdata, ), dtLinkWarning, 2)

        return values
844076
def _extract_values(values_list):
        
        values = []
        # check if file or list of values to iterate
        if isinstance(values_list, str):
            with open(values_list) as ff:
                reading = csv.reader(ff)
                for j in reading:
                    values.append(j[0])
        elif isinstance(values_list, list):
            values = values_list
        else:
            raise Exception("input datatype not supported.")
        return values
935799
def values(self, values):
        
        if isinstance(values, dict):
            l = []
            for column in self._columns:
                l.append(values[column])
            self._values.append(tuple(l))
        else:
            self._values.append(values)
        return self
1288566
def tree_of(values)
        result = {}
        current = result
        values.each do |k, v|
          keys = k.to_s.split('.')
          last_key = keys.pop
          keys.each do |ks|
            current = if current.key?(ks)
                        current[ks]
                      else
                        current[ks] = {}
                        current[ks]
                      end
          end
          current[last_key] = v
          current = result
        end
        result
      end
409415
def data_tree_map(func, data_tree):
    
    def map_to_typed_data(elements):
        if isinstance(elements, ABITypedData) and elements.abi_type is not None:
            return ABITypedData(func(*elements))
        else:
            return elements
    return recursive_map(map_to_typed_data, data_tree)
564488
def get_safe(dict_instance, keypath, default=None):
    
    try:
        obj = dict_instance
        keylist = keypath if type(keypath) is list else keypath.split('.')
        for key in keylist:
            obj = obj[key]
        return obj
    except Exception:
        return default
959280
def iter_annotation_value_pairs(graph) -> Iterable[Tuple[str, str]]:
    
    return (
        (key, value)
        for _, _, data in graph.edges(data=True)
        if ANNOTATIONS in data
        for key, values in data[ANNOTATIONS].items()
        for value in values
    )
1026927
def to_db(self, value):
        

        # ensure value is valid
        self.validate(value)

        assert isinstance(value, list)
        value = list(value)
        for i, v in enumerate(value):
            value[i] = self.value_to_db(v)

        # return result
        assert isinstance(value, list)
        return value
1362709
def datasetItems(self):
        
        out = {}
        for item in self.items():
            if isinstance(item, XChartDatasetItem):
                out[item.dataset()] = item
        return out
1373024
def validate(data, schema, defined_keys=False):
    
    if isinstance(data, dict):
        validator = Validator(data, schema, defined_keys=defined_keys)
        validator.validate()
    else:
        raise TypeError('expected data to be of type dict, but got: %s' % type(data))
939052
def is_data_value(searchpath, searchtree, dtype = None, empty_is_false = False):
    
    if isinstance(searchpath, (str, unicode, int)):
        searchpath = [searchpath]

    if not isinstance(searchpath, (list, tuple)):
        return False

    for d in searchpath:
        if isinstance(searchtree, dict):
            if not d in searchtree.keys():
                return False

        elif isinstance(searchtree, (list, tuple)):
            if (not isinstance(d, int) or (d >= 0 and d >= len(searchtree)) or (d < 0 and -d > len(searchtree))):
                return False

        else:
            return False

        searchtree = searchtree[d]

    if dtype == None and not (empty_is_false and searchtree == None):
        return True

    if empty_is_false and searchtree in (None, "", {}, []):
        return False

    if isinstance(dtype, tuple):
        dtype = list(dtype)

    elif not isinstance(dtype, list):
        dtype = [dtype]

    if float in dtype and not int in dtype:
        dtype.append(int)

    if str in dtype or unicode in dtype or 'string' in dtype:
        for dtp in (str, unicode, 'string'):
            while dtp in dtype:
                dtype.remove(dtp)
        dtype.extend([str, unicode])

    if list in dtype or tuple in dtype or 'list' in dtype:
        for dtp in (list, tuple, 'list'):
            while dtp in dtype:
                dtype.remove(dtp)
        dtype.extend([list, tuple])

    dtype = tuple(dtype)

    return bool(isinstance(searchtree, dtype))
1235186
def keywords(self):
        
        defined_keywords = [
            ('allowempty_map', 'allowempty_map'),
            ('assertion', 'assertion'),
            ('default', 'default'),
            ('class', 'class'),
            ('desc', 'desc'),
            ('enum', 'enum'),
            ('example', 'example'),
            ('extensions', 'extensions'),
            ('format', 'format'),
            ('func', 'func'),
            ('ident', 'ident'),
            ('include_name', 'include'),
            ('length', 'length'),
            ('map_regex_rule', 'map_regex_rule'),
            ('mapping', 'mapping'),
            ('matching', 'matching'),
            ('matching_rule', 'matching_rule'),
            ('name', 'name'),
            ('nullable', 'nullable')
            ('parent', 'parent'),
            ('pattern', 'pattern'),
            ('pattern_regexp', 'pattern_regexp'),
            ('range', 'range'),
            ('regex_mappings', 'regex_mappings'),
            ('required', 'required'),
            ('schema', 'schema'),
            ('schema_str', 'schema_str'),
            ('sequence', 'sequence'),
            ('type', 'type'),
            ('type_class', 'type_class'),
            ('unique', 'unique'),
            ('version', 'version'),
        ]
        found_keywords = []

        for var_name, keyword_name in defined_keywords:
            if getattr(self, var_name, None):
                found_keywords.append(keyword_name)

        return found_keywords
1141117
def dict_values(src):
    
    for v in src.values():
        if isinstance(v, dict):
            for v in dict_values(v):
                yield v
        else:
            yield v
587148
def iter_parsed_values(self, field: Field) -> Iterable[Tuple[str, Any]]:
        
        for key, func in self.parsers.items():
            value = func(field)
            if not value:
                continue
            yield key, value
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
89647
def categories(self, value):
        

        if value is not None:
            assert type(value) is dict, "'{0}' attribute: '{1}' type is not 'dict'!".format("categories", value)
            for key, element in value.iteritems():
                assert type(key) is dict, "'{0}' attribute: '{1}' type is not 'dict'!".format("categories", key)
                assert type(element) is list, "'{0}' attribute: '{1}' type is not 'list'!".format(
                    "categories", element)
        self.__categories = value
1229814
def allowed_values(self):
        
        data = clips.data.DataObject(self._env)

        lib.EnvSlotAllowedValues(
            self._env, self._cls, self._name, data.byref)

        return tuple(data.value) if isinstance(data.value, list) else ()