code: def getargspec(obj):
      """TFDecorator-aware replacement for `inspect.getargspec`.
  
      Note: `getfullargspec` is recommended as the python 2/3 compatible
      replacement for this function.
  
      Args:
        obj: A function, partial function, or callable object, possibly decorated.
  
      Returns:
        The `ArgSpec` that describes the signature of the outermost decorator that
        changes the callable's signature, or the `ArgSpec` that describes
        the object if not decorated.
  
      Raises:
        ValueError: When callable's signature can not be expressed with
          ArgSpec.
        TypeError: For objects of unsupported types.
      """
      if isinstance(obj, functools.partial):
          return _get_argspec_for_partial(obj)
  
      decorators, target = tf.__internal__.decorator.unwrap(obj)
  
      spec = next(
          (
              d.decorator_argspec
              for d in decorators
              if d.decorator_argspec is not None
          ),
          None,
      )
      if spec:
          return spec
  
      try:
          # Python3 will handle most callables here (not partial).
          return _getargspec(target)
      except TypeError:
          pass
  
      if isinstance(target, type):
          try:
              return _getargspec(target.__init__)
          except TypeError:
              pass
  
          try:
              return _getargspec(target.__new__)
          except TypeError:
              pass
  
      # The `type(target)` ensures that if a class is received we don't return
      # the signature of its __call__ method.
      return _getargspec(type(target).__call__)
  
file_path: addons/tensorflow_addons/utils/tf_inspect.py
imports: import collections
  import functools
  import inspect
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: getargspec(obj) and returns: _getargspec, _get_argspec_for_partial, spec, _getargspec, _getargspec, _getargspec