code: def _np_signature(f):
      """An enhanced inspect.signature that can handle numpy.ufunc."""
      # TODO(wangpeng): consider migrating away from inspect.signature.
      # inspect.signature is supported in Python 3.3.
      if not hasattr(inspect, "signature"):
          return None
      if f is None:
          return None
      if not isinstance(f, np.ufunc):
          try:
              return inspect.signature(f)
          except ValueError:
              return None
  
      def names_from_num(prefix, n):
          if n <= 0:
              return []
          elif n == 1:
              return [prefix]
          else:
              return [prefix + str(i + 1) for i in range(n)]
  
      input_names = names_from_num("x", f.nin)
      output_names = names_from_num("out", f.nout)
      keyword_only_params = [
          ("where", True),
          ("casting", "same_kind"),
          ("order", "K"),
          ("dtype", None),
          ("subok", True),
          ("signature", None),
          ("extobj", None),
      ]
      params = []
      params += [
          inspect.Parameter(name, inspect.Parameter.POSITIONAL_ONLY)
          for name in input_names
      ]
      if f.nout > 1:
          params += [
              inspect.Parameter(
                  name, inspect.Parameter.POSITIONAL_ONLY, default=None
              )
              for name in output_names
          ]
      params += [
          inspect.Parameter(
              "out",
              inspect.Parameter.POSITIONAL_OR_KEYWORD,
              default=None if f.nout == 1 else (None,) * f.nout,
          )
      ]
      params += [
          inspect.Parameter(
              name, inspect.Parameter.KEYWORD_ONLY, default=default
          )
          for name, default in keyword_only_params
      ]
      return inspect.Signature(params)
  
imports: import inspect
  import numbers
  import os
  import re
  import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import flexible_dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.numpy_ops import np_arrays
  from tensorflow.python.ops.numpy_ops import np_dtypes
  from tensorflow.python.types import core
  from tensorflow.python.util import nest
  from tensorflow.python.util import tf_export
label_desc: Use image node_id 9 for calling a global function with example usage: _np_signature(f) and returns: inspect, None, None, inspect, list, None, list, unknown