code: def _parse_passage_json(text):
      """Parses passage json object."""
      data = json.loads(text)
      metadata = data["metadata"]
      if "title" in data:
          metadata["title"] = data["title"]
      return {
          "passage_id": data["_id"],
          "passage": data["text"],
          "passage_metadata": json.dumps(metadata),
      }
  
imports: from __future__ import annotations
  import functools
  import json
  import os
  from typing import Mapping
  import numpy
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling a global function with example usage: _parse_passage_json(text) and returns: dict