class_docstr: A class for saving graphs and split in OGB-compatible manner
  Create submission_datasetname/ directory, and output the following two files:
      - datasetname.zip (OGB-compatible zipped dataset folder)
      - meta_dict.pt (torch files storing all the necessary dataset meta-information)
class_docstr_tok: ["A","class","for","saving","graphs","and","split","in","OGB-compatible","manner","Create","submission_datasetname\/","directory",",","and","output","the","following","two","files",":","-","datasetname.zip","(","OGB-compatible","zipped","dataset","folder",")","-","meta_dict.pt","(","torch","files","storing","all","the","necessary","dataset","meta-information",")"]
docstr: task_type (str): For ogbg and ogbn, either classification or regression.
  eval_metric (str): the metric
  if task_type is 'classification', num_classes must be given.
docstr_tok: ["task_type","(","str",")",":","For","ogbg","and","ogbn",",","either","classification","or","regression",".","eval_metric","(","str",")",":","the","metric","if","task_type","is","'classification","'",",","num_classes","must","be","given","."]
code: def save_task_info(self, task_type, eval_metric, num_classes=None):
      """
      task_type (str): For ogbg and ogbn, either classification or regression.
      eval_metric (str): the metric
      if task_type is 'classification', num_classes must be given.
      """
  
      if self.dataset_prefix == "ogbn" or self.dataset_prefix == "ogbg":
          if not (
              "classification" in task_type or "regression" in task_type
          ):
              raise ValueError(
                  f"task type must contain eighther classification or regression, but {task_type} given"
              )
  
      self.task_type = task_type
  
      print(self.task_type)
      print(num_classes)
  
      if "classification" in self.task_type:
          if not (isinstance(num_classes, int) and num_classes > 1):
              raise ValueError(
                  f"num_classes must be an integer larger than 1, {num_classes} given."
              )
          self.num_classes = num_classes
      else:
          self.num_classes = (
              -1
          )  # in the case of regression, just set to -1
  
      self.eval_metric = eval_metric
  
      self._save_task_info_done = True
  
imports: import torch
  import pandas
  import os
  import os.path
  from datetime import date
  import shutil
  from tqdm.auto import tqdm
  import numpy
  from ogb.io.read_graph_raw import read_binary_graph_raw, read_binary_heterograph_raw
  from ogb.utils.torch_util import all_numpy
label_desc: Use image node_id 4 for calling the DatasetSaver obj's underlying member method code with example usage: obj.save_task_info(task_type, eval_metric, num_classes) without return types