code: def testFormatTensorWithMetadata(self):
      a = np.linspace(0.0, 1.0 - 1.0 / 16.0, 16).reshape([4, 4])
  
      out = tensor_format.format_tensor(a, "a", include_metadata=True)
  
      cli_test_utils.assert_lines_equal_ignoring_whitespace(
          self,
          ['Tensor "a":', "  dtype: float64", "  shape: (4, 4)", ""],
          out.lines[:4],
      )
      self.assertEqual(repr(a).split("\n"), out.lines[4:])
  
      self._checkTensorMetadata(a, out.annotations)
      self._checkBeginIndicesAnnotations(out, a)
  
imports: import re
  import numpy
  from tensorflow.core.framework import tensor_pb2
  from tensorflow.core.framework import tensor_shape_pb2
  from tensorflow.core.framework import types_pb2
  from tensorflow.python.debug.cli import cli_test_utils
  from tensorflow.python.debug.cli import tensor_format
  from tensorflow.python.debug.lib import debug_data
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 13 for calling the RichTextLinesTest obj's underlying member method code with example usage: obj.testFormatTensorWithMetadata() without return types