code: def test_that_adding_gradient_scope_does_no_fancy_renaming(self):
      # because it cannot create collisions
      op = caffe2_pb2.OperatorDef()
      op.name = "foo_grad"
      op.input.extend(["foo_grad", "foo_grad_1"])
      shapes = {"foo_grad": [1]}
      track_blob_names = tb._get_blob_names([op])
      tb._add_gradient_scope(shapes, track_blob_names, [op])
      self.assertEqual(op.input[0], "GRADIENTS/foo_grad")
      self.assertEqual(op.input[1], "GRADIENTS/foo_grad_1")
      self.assertEqual(op.name, "GRADIENTS/foo_grad")
      self.assertEqual(len(shapes), 1)
      self.assertEqual(shapes["GRADIENTS/foo_grad"], [1])
      self.assertEqual(len(track_blob_names), 2)
      self.assertEqual(
          track_blob_names["GRADIENTS/foo_grad"], "foo_grad"
      )
      self.assertEqual(
          track_blob_names["GRADIENTS/foo_grad_1"], "foo_grad_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 3 for calling the TensorboardExporterTest obj's underlying member method code with example usage: obj.test_that_adding_gradient_scope_does_no_fancy_renaming() without return types