class_docstr: CFQ task / splits.
docstr: Reduce JSON by filtering out only the fields of interest.
docstr_tok: ["Reduce","JSON","by","filtering","out","only","the","fields","of","interest","."]
code: def _scrub_json(self, content):
      """Reduce JSON by filtering out only the fields of interest."""
      # Loading of json data with the standard Python library is very inefficient:
      # For the 4GB dataset file it requires more than 40GB of RAM and takes 3min.
      # There are more efficient libraries but in order to avoid additional
      # dependencies we use a simple (perhaps somewhat brittle) regexp to reduce
      # the content to only what is needed. This takes 1min to execute but
      # afterwards loading requires only 500MB or RAM and is done in 2s.
      regex = re.compile(
          r'("%s":\s*"[^"]*").*?("%s":\s*"[^"]*")'
          % (_QUESTION_FIELD, _QUERY_FIELD),
          re.DOTALL,
      )
      return (
          "["
          + ",".join(
              [
                  "{" + m.group(1) + "," + m.group(2) + "}"
                  for m in regex.finditer(content)
              ]
          )
          + "]"
      )
  
file_path: datasets/tensorflow_datasets/text/cfq.py
imports: import json
  import os
  import re
  from absl import logging
  from etils import epath
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the CFQ obj's underlying member method code with example usage: obj._scrub_json(content) and returns: unknown