code: def is_placeholder(x):
      """Returns `True` if :attr:`x` is a :tf_main:`tf.placeholder <placeholder>`
      or :tf_main:`tf.placeholder_with_default <placeholder_with_default>`.
      """
      try:
          return x._ops.type in [
              "Placeholder",
              "PlaceholderWithDefault",
          ]
      except BaseException:  # pylint: disable=bare-except
          return False
  
file_path: texar/texar/tf/utils/dtypes.py
imports: import six
  import numpy
  import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: is_placeholder(x) and returns: unknown, False