docstr: Tests that Timeline can handle RPC tracing.
docstr_tok: ["Tests","that","Timeline","can","handle","RPC","tracing","."]
code: def testTimelineWithRPCs(self):
      """Tests that Timeline can handle RPC tracing."""
      metadata = config_pb2.RunMetadata()
      step_stats = metadata.step_stats
      dev_stats = step_stats.dev_stats.add()
      dev_stats.device = "/job:worker/replica:0/task:0/cpu:0"
      node_stats = dev_stats.node_stats.add()
      node_stats.node_name = "RecvTensor"
      node_stats.all_start_micros = 12345
      node_stats.op_end_rel_micros = 42
      node_stats.timeline_label = (
          "[1024B] edge_160_conv2/biases/read from "
          "/job:ps/replica:0/task:3/cpu:0 to "
          "/job:worker/replica:0/task:0/cpu:0"
      )
      tl = timeline.Timeline(step_stats)
      ctf = tl.generate_chrome_trace_format()
      self._validateTrace(ctf)
  
file_path: tensorflow-upstream/tensorflow/python/client/timeline_test.py
imports: import json
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.client import timeline
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 5 for calling the TimelineTest obj's underlying member method code with example usage: obj.testTimelineWithRPCs() without return types