class_docstr: Class that describes how the value of a given attribute should be
  retrieved.
  
  The class contains the following members:
  
      - C{name}: the name of the attribute. This is also used when we
        are trying to get its value from a vertex/edge attribute of a
        graph.
  
      - C{alt_name}: alternative name of the attribute. This is used
        when we are trying to get its value from a Python dict or an
        L{igraph.Configuration} object. If omitted at construction time,
        it will be equal to C{name}.
  
      - C{default}: the default value of the attribute when none of
        the sources we try can provide a meaningful value.
  
      - C{transform}: optional transformation to be performed on the
        attribute value. If C{None} or omitted, it defaults to the
        type of the default value.
  
      - C{func}: when given, this function will be called with an
        index in order to derive the value of the attribute.
code: def __init__(
      self, name, default=None, alt_name=None, transform=None, func=None
  ):
      if isinstance(default, tuple):
          default, transform = default
  
      self.name = name
      self.default = default
      self.alt_name = alt_name or name
      self.transform = transform or None
      self.func = func
      self.accessor = None
  
      if self.transform and not callable(self.transform):
          raise TypeError("transform must be callable")
  
      if self.transform is None and self.default is not None:
          self.transform = type(self.default)
  
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 AttributeSpecification object  with example: obj = AttributeSpecification(name, default, alt_name, transform, func)