code: def test_add_custom_metadata(self):
      writer = metadata_writer.MetadataWriter.create(
          self.image_classifier_model_buffer
      )
      writer.add_custom_metadata(
          TestCustomMetadataMd(name="test_custom_metadata")
      )
      _, metadata_json = writer.populate()
      self.assertJsonEqual(
          metadata_json,
          """
          {
            "subgraph_metadata": [
              {
                "input_tensor_metadata": [
                  {
                    "name": "input"
                  }
                ],
                "output_tensor_metadata": [
                  {
                    "name": "MobilenetV1/Predictions/Reshape_1"
                  }
                ],
                "custom_metadata": [
                  {
                    "name": "test_custom_metadata",
                    "data": [
                      1,
                      2
                    ]
                  }
                ]
              }
            ],
            "min_parser_version": "1.5.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 7 for calling the MetadataWriterForTaskTest obj's underlying member method code with example usage: obj.test_add_custom_metadata() without return types