code: def test_model_metadata(self):
      with tf.Graph().as_default() as graph:
          x = tf.placeholder(tf.float32, shape=(3, 4, 5))
          out = tf.nn.relu(x)
      mlmodel = converter.convert(
          graph,
          inputs=[TensorType(x.op.name, (3, 4, 5))],
          outputs=[out.op.name],
      )
      metadata_keys = (
          mlmodel.get_spec().description.metadata.userDefined
      )
      assert "com.github.apple.coremltools.version" in metadata_keys
      assert "com.github.apple.coremltools.source" in metadata_keys
      assert (
          "tensorflow==1."
          in metadata_keys["com.github.apple.coremltools.source"]
      )
  
imports: import numpy
  import os
  import six
  import pytest
  import shutil
  import tempfile
  import coremltools
  import coremltools.converters
  from coremltools._deps import _IS_MACOS
  import coremltools.proto.FeatureTypes_pb2
  from coremltools import TensorType, ImageType, RangeDim, EnumeratedShapes
  from coremltools.converters.mil.testing_utils import random_gen
  from coremltools.converters.mil.frontend.tensorflow.converter import TFConverter
  from coremltools.converters.mil.frontend.tensorflow.test.testing_utils import frontend, make_tf_graph, run_compare_tf, get_tf_keras_io_names
label_desc: Use image node_id 8 for calling the TestTf1ModelFormats obj's underlying member method code with example usage: obj.test_model_metadata() without return types