code: def _get_colocation(op):
      """Get colocation symbol from op, if any."""
      try:
          return op.get_attr("_class")
      except (ValueError, AttributeError):
          return None
  
imports: import collections
  import contextlib
  import threading
  from tensorflow.python.eager import context
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import gen_resource_variable_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.util import nest
  from tensorflow.python.util import object_identity
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 3 for calling a global function with example usage: _get_colocation(op) and returns: op, None