code: def _metadata_to_json(self, run_id, step_name, task_id, metadata):
      user = get_username()
      return [
          {
              "flow_id": self._flow_name,
              "run_number": run_id,
              "step_name": step_name,
              "task_id": task_id,
              "field_name": datum.field,
              "type": datum.type,
              "value": datum.value,
              "tags": list(set(datum.tags)) if datum.tags else [],
              "user_name": user,
              "ts_epoch": int(round(time.time() * 1000)),
          }
          for datum in metadata
      ]
  
imports: import json
  import os
  import re
  import time
  from collections import namedtuple
  from itertools import chain
  from metaflow.exception import MetaflowInternalError, MetaflowTaggingError
  from metaflow.tagging_util import validate_tag
  from metaflow.util import get_username, resolve_identity_as_tuple, is_stringish
label_desc: Use image node_id 28 for calling the MetadataProvider obj's underlying member method code with example usage: obj._metadata_to_json(run_id, step_name, task_id, metadata) and returns: unknown