code: def RunMetadataLabels(run_metadata):
      """Returns all labels in run_metadata."""
      labels = []
      for dev_stats in run_metadata.step_stats.dev_stats:
          for node_stats in dev_stats.node_stats:
              labels.append(node_stats.timeline_label)
      return labels
  
imports: import os
  import numpy
  from tensorflow.compiler.tests import test_utils
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.compiler.xla import jit
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import function
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import while_loop
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling a global function with example usage: RunMetadataLabels(run_metadata) and returns: labels