class_docstr: Base class for attribute collector subclasses. Classes that inherit
  this class may use a declarative syntax to specify which vertex or edge
  attributes they intend to collect. See L{AttributeCollectorMeta} for
  the details.
docstr: Constructs a new attribute collector that uses the given
  vertex/edge sequence and the given dict as data sources.
  
  @param seq: an L{igraph.VertexSeq} or L{igraph.EdgeSeq} class
    that will be used as a data source for attributes.
  @param kwds: a Python dict that will be used to override the
    attributes collected from I{seq} if necessary.
docstr_tok: ["Constructs","a","new","attribute","collector","that","uses","the","given","vertex\/edge","sequence","and","the","given","dict","as","data","sources",".","@","param","seq",":","an","L","{","igraph.VertexSeq","}","or","L","{","igraph.EdgeSeq","}","class","that","will","be","used","as","a","data","source","for","attributes",".","@","param","kwds",":","a","Python","dict","that","will","be","used","to","override","the","attributes","collected","from","I","{","seq","}","if","necessary","."]
code: def __init__(self, seq, kwds=None):
      """Constructs a new attribute collector that uses the given
      vertex/edge sequence and the given dict as data sources.
  
      @param seq: an L{igraph.VertexSeq} or L{igraph.EdgeSeq} class
        that will be used as a data source for attributes.
      @param kwds: a Python dict that will be used to override the
        attributes collected from I{seq} if necessary.
      """
      elt = self.__class__.Element
      self._cache = [elt() for _ in range(len(seq))]
  
      self.seq = seq
      self.kwds = kwds or {}
  
      for attr_spec in self._attributes:
          values = self._collect_attributes(attr_spec)
          attr_name = attr_spec.name
          for cache_elt, val in zip(self._cache, values):
              setattr(cache_elt, attr_name, val)
  
file_path: python-igraph/src/igraph/drawing/metamagic.py
imports: from configparser import NoOptionError
  from igraph.configuration import Configuration
label_desc: Use image node_id 1 to create a new AttributeCollectorBase object from inherited base classes: object with example: obj = AttributeCollectorBase(seq, kwds)