code: def load_data(
      stage: str = "train",
      task: str = "classification",
      return_classes: bool = False,
  ) -> typing.Union[matchzoo.DataPack, tuple]:
      """
      Load QuoraQP data.
  
      :param path: `None` for download from quora, specific path for
          downloaded data.
      :param stage: One of `train`, `dev`, and `test`.
      :param task: Could be one of `ranking`, `classification` or a
          :class:`matchzoo.engine.BaseTask` instance.
      :param return_classes: Whether return classes for classification task.
      :return: A DataPack if `ranking`, a tuple of (DataPack, classes) if
          `classification`.
      """
      if stage not in ("train", "dev", "test"):
          raise ValueError(
              f"{stage} is not a valid stage."
              f"Must be one of `train`, `dev`, and `test`."
          )
  
      data_root = _download_data()
      file_path = data_root.joinpath(f"{stage}.tsv")
      data_pack = _read_data(file_path, stage)
  
      if task == "ranking":
          task = matchzoo.tasks.Ranking()
      elif task == "classification":
          task = matchzoo.tasks.Classification()
  
      if isinstance(task, matchzoo.tasks.Ranking):
          return data_pack
      elif isinstance(task, matchzoo.tasks.Classification):
          if stage != "test":
              data_pack.one_hot_encode_label(
                  num_classes=2, inplace=True
              )
          if return_classes:
              return data_pack, [False, True]
          else:
              return data_pack
      else:
          raise ValueError(f"{task} is not a valid task.")
  
imports: import typing
  from pathlib import Path
  import keras
  import pandas
  import matchzoo
label_desc: Use image node_id 1 for calling a global function with example usage: load_data(stage, task, return_classes) and returns: data_pack, data_pack,  list, data_pack