code: def is_callable(x):
      """Return `True` if :attr:`x` is callable."""
      try:
          _is_callable = callable(x)
      except BaseException:  # pylint: disable=bare-except
          _is_callable = hasattr(x, "__call__")
      return _is_callable
  
file_path: texar/texar/tf/utils/dtypes.py
imports: import six
  import numpy
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: is_callable(x) and returns: _is_callable