code: def testMetricKeyStrForMetricKeyWithAllFields(self):
      self.assertEqual(
          str(
              metric_types.MetricKey(
                  name="metric_name",
                  model_name="model_name",
                  output_name="output_name",
                  sub_key=metric_types.SubKey(class_id=1),
                  example_weighted=True,
                  is_diff=True,
              )
          ),
          'name: "metric_name" output_name: "output_name" '
          + 'sub_key: { class_id: { value: 1 } } model_name: "model_name" '
          + "is_diff: true example_weighted: { value: true }",
      )
  
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 2 for calling the MetricTypesTest obj's underlying member method code with example usage: obj.testMetricKeyStrForMetricKeyWithAllFields() without return types