code: def _AddPathSegments(self, path, ignore_list):
      
      path_segments = path.split(self._path_segment_separator)
      for path_segment_index, path_segment in enumerate(path_segments):
        if path_segment_index not in self.path_segments_per_index:
          self.path_segments_per_index[path_segment_index] = {}
  
        if path_segment_index not in ignore_list:
          path_segments = self.path_segments_per_index[path_segment_index]
  
          if path_segment not in path_segments:
            path_segments[path_segment] = []
  
          paths_per_segment_list = path_segments[path_segment]
          paths_per_segment_list.append(path)
docs: Adds the path segments to the table.
  
      Args:
        path: a string containing the path.
        ignore_list: a list of path segment indexes to ignore, where 0 is the
                     index of the first path segment relative from the root.