returns for one cycle an element name dictionary.
347705
def _get_elem_names(self):
        

        import nuutils as u

        # provide library for Z versus element names, and Z for elements
        #element_name = self.se.elements
        element_name = self.elements_names
        u.give_zip_element_z_and_names(element_name)
        self.z_of_element_name = u.index_z_for_elements
632247
def get_index_by_name(self, name):
        """"""
        for i in range(len(self.vertices)):
            if self.vertices[i].name == name:
                return i
        raise ValueError('Reverse look up of name failed.')
417532
def as_dict(self):
        """"""
        dicts = [x.as_dict for x in self.children]
        return {'{0} {1}'.format(self.name, self.value): dicts}
802926
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'text' in _dict:
            args['text'] = _dict.get('text')
        if 'location' in _dict:
            args['location'] = Location._from_dict(_dict.get('location'))
        if 'element_locations' in _dict:
            args['element_locations'] = [
                ElementLocations._from_dict(x)
                for x in (_dict.get('element_locations'))
            ]
        return cls(**args)
270358
def _parse_dict(element, definition):
    
    sub_dict = {}

    for name, subdef in viewitems(definition):
        (name, required) = _parse_name(name)

        sub_dict[name] = xml_to_json(element, subdef, required)

    return sub_dict
1236558
def __get_cycle(graph, ordering, parent_lookup):
    """"""
    root_node = ordering[0]
    for i in range(2, len(ordering)):
        current_node = ordering[i]
        if graph.adjacent(current_node, root_node):
            path = []
            while current_node != root_node:
                path.append(current_node)
                current_node = parent_lookup[current_node]
            path.append(root_node)
            path.reverse()
            return path
33562
def name(self, key, value):
    
    def _get_title(value):
        c_value = force_single_element(value.get('c', ''))
        if c_value != 'title (e.g. Sir)':
            return c_value

    def _get_value(value):
        a_value = force_single_element(value.get('a', ''))
        q_value = force_single_element(value.get('q', ''))
        return a_value or normalize_name(q_value)

    if value.get('d'):
        dates = value['d']
        try:
            self['death_date'] = normalize_date(dates)
        except ValueError:
            dates = dates.split(' - ')
            if len(dates) == 1:
                dates = dates[0].split('-')
            self['birth_date'] = normalize_date(dates[0])
            self['death_date'] = normalize_date(dates[1])

    self['status'] = force_single_element(value.get('g', '')).lower()

    return {
        'numeration': force_single_element(value.get('b', '')),
        'preferred_name': force_single_element(value.get('q', '')),
        'title': _get_title(value),
        'value': _get_value(value),
    }
503573
def key_of(d):
    
    if len(d) > 1 and not type(d) == dict():
        raise ValueError('key_of(d) may only except single element dict')
    else:
        return keys_of(d)[0]
669030
def get_cycle(plugins, cycle_start)
      cycle = plugins.drop_while { |plugin| !plugin.eql?(cycle_start) }
      names = []
      cycle.each { |plugin| names << plugin.name }
      names
    end
131370
def name(self):
        """"""
        if self._name_map is None:
            self._name_map = {}
            for key, value in self.__class__.__dict__.items():
                if isinstance(value, self.__class__):
                    self._name_map[value] = key
        return self._name_map[self]
479655
def elementTypeName(self):
        
        if self._ndFrame is None:
            return super(AbstractPandasNDFrameRti, self).elementTypeName
        else:
            try:
                return str(self._ndFrame.dtype) # Series
            except AttributeError:
                return '<structured>'
180916
def etd_ms_py2dict(elements):
    """"""
    metadata_dict = {}
    # Loop through all elements in the Python object.
    for element in elements.children:
        # Start an empty element list if an entry for the element
        # list hasn't been made in the dictionary.
        if element.tag not in metadata_dict:
            metadata_dict[element.tag] = []
        element_dict = {}
        if hasattr(element, 'role'):
            element_dict['role'] = element.role
        elif hasattr(element, 'scheme'):
            element_dict['scheme'] = element.scheme
        elif hasattr(element, 'qualifier') and element.qualifier is not None \
                and element.tag == 'title':
            element_dict['qualifier'] = element.qualifier
        # Set the element's content as a dictionary
        # of children elements.
        if element.children:
            child_dict = {}
            for child in element.children:
                if child.content is not None:
                    child_dict[child.tag] = child.content
            element_dict['content'] = child_dict
        # Set element content that is not children.
        elif element.content is not None:
            if element.content.strip() != '':
                element_dict['content'] = element.content
        # Append the dictionary to the element list
        # if the element has content or children.
        if element_dict.get('content', False):
            metadata_dict[element.tag].append(element_dict)

    return metadata_dict
26791
def elements(self):
		'''

		'''
                try:
                        iteritems = self.iteritems()
                except AttributeError:
                        iteritems = iter(self)
		for elem, count in iteritems:
			for _ in repeat(None, count):
				yield elem
1174986
def _element_to_dict(data, position, obj_end, opts):
    """"""
    element_type = data[position:position + 1]
    position += 1
    element_name, position = _get_c_string(data, position, opts)
    try:
        value, position = _ELEMENT_GETTER[element_type](data, position,
                                                        obj_end, opts,
                                                        element_name)
    except KeyError:
        _raise_unknown_type(element_type, element_name)

    if opts.type_registry._decoder_map:
        custom_decoder = opts.type_registry._decoder_map.get(type(value))
        if custom_decoder is not None:
            value = custom_decoder(value)

    return element_name, value, position
265603
def name(self, node, children):
        ''
        return self.env.get(node.text.strip(), -1)
703004
def _get_elementwise_name_from_keras_layer(keras_layer):
    
    mode = keras_layer.mode
    if mode == 'sum':
        return 'ADD'
    elif mode == 'mul':
        return 'MULTIPLY'
    elif mode == 'concat':
        if len(keras_layer.input_shape[0]) == 3 and (keras_layer.concat_axis == 1 or keras_layer.concat_axis == -2):
            return 'SEQUENCE_CONCAT'
        elif len(keras_layer.input_shape[0]) == 4 and (keras_layer.concat_axis == 3 or keras_layer.concat_axis == -1):
            return 'CONCAT'
        elif len(keras_layer.input_shape[0]) == 2 and (keras_layer.concat_axis == 1 or keras_layer.concat_axis == -1):
            return 'CONCAT'
        else:
            option = "input_shape = %s concat_axis = %s" % (str(keras_layer.input_shape[0]), str(keras_layer.concat_axis))
            _utils.raise_error_unsupported_option(option, mode, keras_layer.name)
    elif mode == 'cos':
        if len(keras_layer.input_shape[0]) == 2:
            return 'COS'
        else:
            option = "input_shape = %s" % (str(keras_layer.input_shape[0]))
            _utils.raise_error_unsupported_option(option, mode, keras_layer.name)
    elif mode == 'dot':
        if len(keras_layer.input_shape[0]) == 2:
            return 'DOT'
        else:
            option = "input_shape = %s" % (str(keras_layer.input_shape[0]))
            _utils.raise_error_unsupported_option(option, mode, keras_layer.name)
    elif mode == 'max':
        return 'MAX'
    elif mode == 'ave':
        return 'AVE'
    else:
        _utils.raise_error_unsupported_categorical_option('mode', mode, 'Merge',
                keras_layer.name)
1285524
private static Element getFirstNamedElement(Element element, String name) {
		NodeList list = element.getElementsByTagName(name);
		if (list.getLength() == 0) {
			return null;
		}

		return (Element) list.item(0);
	}