class_docstr: Metaclass for Enum
class_docstr_tok: ["Metaclass","for","Enum"]
docstr: Either returns an existing member, or creates a new enum class.
  
  This method is used both when an enum class is given a value to match
  to an enumeration member (i.e. Color(3)) and for the functional API
  (i.e. Color = Enum('Color', names='red green blue')).
  
  When used for the functional API: `module`, if set, will be stored in
  the new class' __module__ attribute; `type`, if set, will be mixed in
  as the first base class.
  
  Note: if `module` is not set this routine will attempt to discover the
  calling module by walking the frame stack; if this is unsuccessful
  the resulting class will not be pickleable.
docstr_tok: ["Either","returns","an","existing","member",",","or","creates","a","new","enum","class",".","This","method","is","used","both","when","an","enum","class","is","given","a","value","to","match","to","an","enumeration","member","(","i.e",".","Color","(","3",")",")","and","for","the","functional","API","(","i.e",".","Color","=","Enum","(","'Color","'",",","names='red","green","blue","'",")",")",".","When","used","for","the","functional","API",":","`","module","`",",","if","set",",","will","be","stored","in","the","new","class","'","__module__","attribute",";","`","type","`",",","if","set",",","will","be","mixed","in","as","the","first","base","class",".","Note",":","if","`","module","`","is","not","set","this","routine","will","attempt","to","discover","the","calling","module","by","walking","the","frame","stack",";","if","this","is","unsuccessful","the","resulting","class","will","not","be","pickleable","."]
code: def __call__(
      cls,
      value,
      names=None,
      module=None,
      type=None,
      start=1,
      allow_synonyms=True,
  ):
      """Either returns an existing member, or creates a new enum class.
  
      This method is used both when an enum class is given a value to match
      to an enumeration member (i.e. Color(3)) and for the functional API
      (i.e. Color = Enum('Color', names='red green blue')).
  
      When used for the functional API: `module`, if set, will be stored in
      the new class' __module__ attribute; `type`, if set, will be mixed in
      as the first base class.
  
      Note: if `module` is not set this routine will attempt to discover the
      calling module by walking the frame stack; if this is unsuccessful
      the resulting class will not be pickleable.
  
      """
      if names is None:  # simple value lookup
          return cls.__new__(cls, value)
      # otherwise, functional API: we're creating a new Enum type
      return cls._create_(
          value,
          names,
          module=module,
          type=type,
          start=start,
          allow_synonyms=allow_synonyms,
      )
  
imports: import sys
label_desc: Use image node_id 4 for calling the EnumMeta obj's underlying member method code with example usage: obj.__call__(cls, value, names, module, type, start, allow_synonyms) and returns: cls, cls