code: def testMetricKeyStrForMetricKeyWithOneField(self):
      self.assertEqual(
          str(metric_types.MetricKey(name="metric_name")),
          'name: "metric_name" example_weighted: { }',
      )
  
file_path: model-analysis/tensorflow_model_analysis/metrics/metric_types_test.py
imports: import tensorflow
  from tensorflow_model_analysis.metrics import metric_types
label_desc: Use image node_id 1 for calling the MetricTypesTest obj's underlying member method code with example usage: obj.testMetricKeyStrForMetricKeyWithOneField() without return types