Append the list of element names as a path to the provided start element.

    :return: The final element along the path.
339361
def _element_append_path(
        start_element,  # type: ET.Element
        element_names  # type: Iterable[Text]
):
    # type: (...) -> ET.Element
    
    end_element = start_element
    for element_name in element_names:
        new_element = ET.Element(element_name)
        end_element.append(new_element)
        end_element = new_element

    return end_element
1345476
private SVGPath append(char action) {
    assert lastaction != 0 || action == PATH_MOVE : "Paths must begin with a move to the initial position!";
    if(lastaction != action) {
      buf.append(action);
      lastaction = action;
    }
    return this;
  }
1106871
def _start_path(self, sp):
        
        path = sp.add_path(w=self._dx, h=self._dy)
        path.add_moveTo(
            *self._local_to_shape(
                self._start_x, self._start_y
            )
        )
        return path
778251
def _handle_end_node(self):
        
        self._result.append(Node(result=self._result, **self._curr))
        self._curr = {}
1052850
def __begin_of_list(self, ast_token):
        """"""
        self.list_level += 1
        if self.list_level == 1:
            self.final_ast_tokens.append(ast_token)
192636
private CompletableFuture<Void> appendInitialEntries() {
    final long term = raft.getTerm();

    return appendAndCompact(new InitializeEntry(term, appender.getTime())).thenApply(index -> null);
  }
813102
def get_path(element):
    

    path = {}
    path['osmid'] = element['id']

    # remove any consecutive duplicate elements in the list of nodes
    grouped_list = groupby(element['nodes'])
    path['nodes'] = [group[0] for group in grouped_list]

    if 'tags' in element:
        for useful_tag in settings.useful_tags_path:
            if useful_tag in element['tags']:
                path[useful_tag] = element['tags'][useful_tag]
    return path
494335
def addParts(parentPart, childPath, count, index):
    
    if index == None:
        index = 0
    if index == len(childPath):
        return
    c = childPath[index]
    parentPart.count = coalesce(parentPart.count, 0) + count

    if parentPart.partitions == None:
        parentPart.partitions = FlatList()
    for i, part in enumerate(parentPart.partitions):
        if part.name == c.name:
            addParts(part, childPath, count, index + 1)
            return

    parentPart.partitions.append(c)
    addParts(c, childPath, count, index + 1)
655669
def addend_ids(self):
        
        return tuple(
            arg
            for arg in self._subtotal_dict.get("args", [])
            if arg in self.valid_elements.element_ids
        )
525813
def dt(self, start_node=None):
        
        if start_node is None:
            return self.root2tree(start_node=start_node)

        elem_id = start_node
        if elem_id not in self.elem_dict:
            return []

        elem = self.elem_dict[elem_id]
        elem_type = elem['element_type']

        assert elem_type in ('segment', 'group')

        if elem_type == 'segment':
            return self.segment2tree(
                elem_id, elem, elem_type, start_node=start_node)

        else:
            return self.group2tree(
                elem_id, elem, elem_type, start_node=start_node)
726043
def _walk_to_root(path, break_at=None):
    
    if not os.path.exists(path):  # pragma: no cover
        raise IOError("Starting path not found")

    if os.path.isfile(path):  # pragma: no cover
        path = os.path.dirname(path)

    last_dir = None
    current_dir = os.path.abspath(path)
    paths = []
    while last_dir != current_dir:
        paths.append(current_dir)
        paths.append(os.path.join(current_dir, "config"))
        if break_at and current_dir == os.path.abspath(break_at):  # noqa
            logger.debug("Reached the %s directory, breaking.", break_at)
            break
        parent_dir = os.path.abspath(os.path.join(current_dir, os.path.pardir))
        last_dir, current_dir = current_dir, parent_dir
    return paths
983430
B append(String path) {
    Preconditions.checkArgument(
        path != null && !path.isEmpty(), "'path' must be a non-empty String");
    ImmutableList.Builder<String> components = ImmutableList.builder();
    components.addAll(this.getSegments());
    components.add(splitChildPath(path));
    return createPathWithSegments(components.build());
  }
443311
def _get_starting_paths(self, curdir):
        

        results = [curdir]

        if not self._is_parent(curdir) and not self._is_this(curdir):
            fullpath = os.path.abspath(curdir)
            basename = os.path.basename(fullpath)
            dirname = os.path.dirname(fullpath)
            if basename:
                matcher = self._get_matcher(basename)
                results = [os.path.basename(name) for name in self._glob_dir(dirname, matcher, self)]

        return results
797820
def append_field(self, path, name, value):
        
        path = make_path(path)
        container = self.get_container(path)
        current = container._values.get(name, None)
        if current is None:
            container._values[name] = value
        elif isinstance(current, ValueTree):
            raise TypeError()
        elif isinstance(current, list):
            container._values[name] = current + [value]
        else:
            container._values[name] = [current, value]
1035367
def addPath(rel_path, prepend=False):
    
    path = lambda *paths: os.path.abspath(
        os.path.join(os.path.dirname(__file__), *paths)) + '/'
    if prepend:
      return sys.path.insert(0, path(rel_path))
    return sys.path.append(path(rel_path))
43139
def append(self, listname, xy_idx, var_name, element_name):
        """"""
        self.resize()
        string = '{0} {1}'
        if listname not in ['unamex', 'unamey', 'fnamex', 'fnamey']:
            logger.error('Wrong list name for varname.')
            return
        elif listname in ['fnamex', 'fnamey']:
            string = '${0}\\ {1}$'

        if isinstance(element_name, list):
            for i, j in zip(xy_idx, element_name):
                # manual elem_add LaTex space for auto-generated element name
                if listname == 'fnamex' or listname == 'fnamey':
                    j = j.replace(' ', '\\ ')
                self.__dict__[listname][i] = string.format(var_name, j)
        elif isinstance(element_name, int):
            self.__dict__[listname][xy_idx] = string.format(
                var_name, element_name)
        else:
            logger.warning(
                'Unknown element_name type while building varname')
185611
def el_to_path_vector(el):
    
    path = []
    while el.parent:
        path.append(el)
        el = el.parent

    return list(reversed(path + [el]))