code: def _inspect_getargspec(fn):
      """Returns `inspect.getargspec(fn)` for Py2 and `inspect.getfullargspec(fn)`
      for Py3
      """
      try:
          return inspect.getfullargspec(fn)
      except AttributeError:
          try:
              return inspect.getargspec(fn)
          except TypeError:
              return inspect.getargspec(fn.__call__)
  
imports: from typing import List, Union
  import inspect
  import funcsigs
  from pydoc import locate
  import copy
  import collections
  import numpy
  import tensorflow
  from texar.tf.hyperparams import HParams
  from texar.tf.utils.dtypes import is_str, is_callable, compat_as_text, _maybe_list_to_array
label_desc: Use image node_id 2 for calling a global function with example usage: _inspect_getargspec(fn) and returns: inspect, inspect, inspect