code: def current():
      """Return a string (not canonicalized) for the current device."""
      # TODO(josh11b): Work out how this function interacts with ops.colocate_with.
      if ops.executing_eagerly_outside_functions():
          d = context.context().device_name
      else:
          op = _FakeOperation()
          ops.get_default_graph()._apply_device_functions(
              op
          )  # pylint: disable=protected-access
          d = op.device
      return d
  
file_path: tensorflow-upstream/tensorflow/python/distribute/device_util.py
imports: from tensorflow.python.eager import context
  from tensorflow.python.framework import config
  from tensorflow.python.framework import device
  from tensorflow.python.framework import ops
label_desc: Use image node_id 4 for calling a global function with example usage: current() and returns: d