code: def test_preserves_existing_session(self):
      with tf.Session() as sess:
          op = tf.reduce_sum(input_tensor=[2, 2])
          self.assertIs(sess, tf.get_default_session())
  
          result = self._square(123)
          self.assertEqual(123 * 123, result)
  
          self.assertIs(sess, tf.get_default_session())
          number_of_lights = sess.run(op)
          self.assertEqual(number_of_lights, 4)
  
file_path: tensorboard/tensorboard/util/op_evaluator_test.py
imports: import tensorflow.compat.v1
  from tensorboard.util import op_evaluator
label_desc: Use image node_id 2 for calling the PersistentOpEvaluatorTest obj's underlying member method code with example usage: obj.test_preserves_existing_session() without return types