code: def test_image_classifier(self):
      writer = metadata_writer.MetadataWriter.create(
          self.image_classifier_model_buffer
      )
      writer.add_general_info(
          model_name="image_classifier",
          model_description="Imagenet classification model",
      )
      writer.add_image_input(
          norm_mean=[127.5, 127.5, 127.5],
          norm_std=[127.5, 127.5, 127.5],
          color_space_type=metadata_writer.MetadataWriter.color_space_types.RGB,
      )
      writer.add_classification_output(
          metadata_writer.Labels().add(["a", "b", "c"])
      )
      _, metadata_json = writer.populate()
      self.assertJsonEqual(
          metadata_json,
          """{
            "name": "image_classifier",
            "description": "Imagenet classification model",
            "subgraph_metadata": [
              {
                "input_tensor_metadata": [
                  {
                    "name": "image",
                    "description": "Input image to be processed.",
                    "content": {
                      "content_properties_type": "ImageProperties",
                      "content_properties": {
                        "color_space": "RGB"
                      }
                    },
                    "process_units": [
                      {
                        "options_type": "NormalizationOptions",
                        "options": {
                          "mean": [
                            127.5,
                            127.5,
                            127.5
                          ],
                          "std": [
                            127.5,
                            127.5,
                            127.5
                          ]
                        }
                      }
                    ],
                    "stats": {
                      "max": [
                        1.0,
                        1.0,
                        1.0
                      ],
                      "min": [
                        -1.0,
                        -1.0,
                        -1.0
                      ]
                    }
                  }
                ],
                "output_tensor_metadata": [
                  {
                    "name": "score",
                    "description": "Score of the labels respectively.",
                    "content": {
                      "content_properties_type": "FeatureProperties",
                      "content_properties": {
                      }
                    },
                    "stats": {
                      "max": [
                        1.0
                      ],
                      "min": [
                        0.0
                      ]
                    },
                    "associated_files": [
                      {
                        "name": "labels.txt",
                        "description": "Labels for categories that the model can recognize.",
                        "type": "TENSOR_AXIS_LABELS"
                      }
                    ]
                  }
                ]
              }
            ],
            "min_parser_version": "1.0.0"
          }
          """,
      )
  
imports: import os
  import tempfile
  from absl.testing import absltest
  from mediapipe.tasks.metadata import metadata_schema_py_generated
  from mediapipe.tasks.python.metadata.metadata_writers import metadata_info
  from mediapipe.tasks.python.metadata.metadata_writers import metadata_writer
  from mediapipe.tasks.python.test import test_utils
label_desc: Use image node_id 4 for calling the MetadataWriterForTaskTest obj's underlying member method code with example usage: obj.test_image_classifier() without return types