code: def _artifacts_to_json(
      self, run_id, step_name, task_id, attempt_id, artifacts
  ):
      result = []
      for art in artifacts:
          d = {
              "run_number": run_id,
              "step_name": step_name,
              "task_id": task_id,
              "attempt_id": attempt_id,
              "name": art.name,
              "content_type": art.type,
              "type": "metaflow.artifact",
              "sha": art.sha,
              "ds_type": art.ds_type,
              "location": art.url
              if art.url
              else ":root:%s" % art.ds_root,
          }
          d.update(
              self._all_obj_elements(
                  self.sticky_tags, self.sticky_sys_tags
              )
          )
          result.append(d)
      return result
  
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 27 for calling the MetadataProvider obj's underlying member method code with example usage: obj._artifacts_to_json(run_id, step_name, task_id, attempt_id, artifacts) and returns: result