code: def dispatch(op, args, kwargs):
      """Returns the result from the first successful dispatcher for a given op.
  
      Calls the `handle` method of each `OpDispatcher` that has been registered
      to handle `op`, and returns the value from the first successful handler.
  
      Args:
        op: Python function: the operation to dispatch for.
        args: The arguments to the operation.
        kwargs: They keyword arguments to the operation.
  
      Returns:
        The result of the operation, or `NOT_SUPPORTED` if no registered
        dispatcher can handle the given arguments.
      """
      for dispatcher in getattr(op, FALLBACK_DISPATCH_ATTR):
          result = dispatcher.handle(args, kwargs)
          if result is not OpDispatcher.NOT_SUPPORTED:
              return result
      for dispatcher in _GLOBAL_DISPATCHERS:
          result = dispatcher.handle(op, args, kwargs)
          if result is not OpDispatcher.NOT_SUPPORTED:
              return result
      return OpDispatcher.NOT_SUPPORTED
  
imports: import collections
  import itertools
  import typing
  from tensorflow.python.framework import _pywrap_python_api_dispatcher
  from tensorflow.python.framework import ops
  from tensorflow.python.util import tf_decorator
  from tensorflow.python.util import tf_export
  from tensorflow.python.util import tf_inspect
  from tensorflow.python.util import traceback_utils
  from tensorflow.python.util import type_annotations
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 for calling a global function with example usage: dispatch(op, args, kwargs) and returns: OpDispatcher, result, result