code: def get_config_fields(obj):
      """
      Return a dict of config help for this object, where:
      - key: config name
      - value: (default, type, options)
  
          - default: default value for this key if not specified
          - type: type for this config value, as a string
          - options: possible values for this config, only if type = Union
  
      If the type is "Union", the options give the lists of class names that
      are possible, and the default is one of those class names.
      """
      ret = {}
      members = get_class_members_recursive(obj)
      # Add fields with type by no default value
      typed_members = [k for k in members.get("__annotations__", {})]
      for k in typed_members:
          if k not in members:
              members[k] = None
      if issubclass(obj.__class__, Enum):
          opt = members.get("_member_names_")
          if opt is not None:
              typing = obj.__name__
              ret[typing] = (opt[0], typing, set(opt))
              return ret
          else:
              return obj
  
      for k, v in sorted(members.items()):
          if k.startswith("_"):
              continue
          typing = members.get("__annotations__", {}).get(k)
          if issubclass(type(v), Enum):
              ret[k] = (v._name_, typing, set(type(v)._member_names_))
          elif not typing:
              if not isfunction(v):
                  ret[k] = (v, None, None)
          # type(Union) changed from Py3.6 to 3.7
          elif (
              hasattr(typing, "__origin__")
              and typing.__origin__ == Union
          ):
              options = set()
              for t in typing.__args__:
                  options.add(get_component_name(t))
              ret[k] = (v, None, options)
          else:
              ret[k] = (v, get_component_name(typing), None)
      return ret
  
file_path: pytext/pytext/utils/documentation.py
imports: from enum import Enum
  from inspect import getmembers, isclass, isfunction
  from sys import modules
  from typing import Union
  import torch
  from pytext.config.component import Component, get_component_name
  from pytext.config.pytext_config import ConfigBase
  from pytext.models.module import Module
label_desc: Use image node_id 2 for calling a global function with example usage: get_config_fields(obj) and returns: ret, ret, obj