code: def test_that_auto_ssa_gives_non_colliding_names(self):
      op1 = caffe2_pb2.OperatorDef()
      op1.output.extend(["foo"])
      op2 = caffe2_pb2.OperatorDef()
      op2.input.extend(["foo"])
      op2.output.extend(["foo"])
      op2.output.extend(["foo_1"])
      shapes = {"foo": [1], "foo_1": [2]}
      track_blob_names = tb._get_blob_names([op1, op2])
      tb._convert_to_ssa(shapes, track_blob_names, [op1, op2])
      self.assertEqual(op1.output[0], "foo")
      self.assertEqual(op2.input[0], "foo")
      self.assertEqual(op2.output[0], "foo_1")
      # Unfortunate name but we do not parse original `_` for now.
      self.assertEqual(op2.output[1], "foo_1_1")
      self.assertEqual(len(shapes), 3)
      self.assertEqual(shapes["foo"], [1])
      self.assertEqual(shapes["foo_1"], [1])
      self.assertEqual(shapes["foo_1_1"], [2])
      self.assertEqual(len(track_blob_names), 3)
      self.assertEqual(track_blob_names["foo"], "foo")
      self.assertEqual(track_blob_names["foo_1"], "foo")
      self.assertEqual(track_blob_names["foo_1_1"], "foo_1")
  
file_path: pytorch/caffe2/contrib/tensorboard/tensorboard_exporter_test.py
imports: import unittest
  from caffe2.proto import caffe2_pb2
  import caffe2.python.cnn
  import caffe2.python.core
  import caffe2.contrib.tensorboard.tensorboard_exporter
label_desc: Use image node_id 4 for calling the TensorboardExporterTest obj's underlying member method code with example usage: obj.test_that_auto_ssa_gives_non_colliding_names() without return types