code: def testLocateTensorElementAnnotationsUnavailable(self):
      tensor_proto = tensor_pb2.TensorProto(
          dtype=types_pb2.DataType.Value("DT_FLOAT"),
          tensor_shape=tensor_shape_pb2.TensorShapeProto(
              dim=[tensor_shape_pb2.TensorShapeProto.Dim(size=1)]
          ),
      )
      out = tensor_format.format_tensor(
          debug_data.InconvertibleTensorProto(tensor_proto, False), "a"
      )
  
      self.assertEqual(
          ['Tensor "a":', "", "Uninitialized tensor:"], out.lines[:3]
      )
  
      with self.assertRaisesRegex(
          AttributeError,
          "tensor_metadata is not available in annotations",
      ):
          tensor_format.locate_tensor_element(out, [0])
  
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 29 for calling the RichTextLinesTest obj's underlying member method code with example usage: obj.testLocateTensorElementAnnotationsUnavailable() without return types