code: def testCorrectFormatWithActiveDeviceAssignments(self):
      assignments = []
      assignments.append(
          traceable_stack.TraceableObject(
              "/cpu:0", filename="hope.py", lineno=24
          )
      )
      assignments.append(
          traceable_stack.TraceableObject(
              "/gpu:2", filename="please.py", lineno=42
          )
      )
  
      summary = error_interpolation._compute_device_summary_from_list(
          "nodename", assignments, prefix="  "
      )
  
      self.assertIn("nodename", summary)
      self.assertIn("tf.device(/cpu:0)", summary)
      self.assertIn("<hope.py:24>", summary)
      self.assertIn("tf.device(/gpu:2)", summary)
      self.assertIn("<please.py:42>", summary)
  
imports: import collections
  import os
  import re
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import error_interpolation
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework import traceable_stack
  from tensorflow.python.ops import control_flow_assert
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import script_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the ComputeDeviceSummaryFromOpTest obj's underlying member method code with example usage: obj.testCorrectFormatWithActiveDeviceAssignments() without return types