code: def do_one(data_id, num_downloads):
      from datasets import load_dataset
  
      out_file = "data_%s.parquet" % str(data_id.replace("/", "_"))
      if (
          os.path.isfile(out_file)
          and os.path.getsize(out_file) > 1024**3
      ):
          return
      try:
          print(
              "Loading data_id %s num_downloads: %s"
              % (data_id, num_downloads),
              flush=True,
          )
          avail_list = None
          try:
              data = load_dataset(data_id, "foobar")
          except Exception as e:
              if "Available: " in str(e):
                  avail_list = ast.literal_eval(
                      str(e).split("Available:")[1].strip()
                  )
              else:
                  avail_list = None
          if avail_list is None:
              avail_list = [None]
          print("%s avail_list: %s" % (data_id, avail_list), flush=True)
  
          for name in avail_list:
              out_file = "data_%s_%s.parquet" % (
                  str(data_id.replace("/", "_")),
                  str(name),
              )
              if os.path.isfile(out_file):
                  continue
              data = load_dataset(data_id, name)
              column_names_dict = data.column_names
              column_names = column_names_dict[
                  list(column_names_dict.keys())[0]
              ]
              print(
                  "Processing data_id %s num_downloads: %s columns: %s"
                  % (data_id, num_downloads, column_names),
                  flush=True,
              )
              data_dict = data.data
              col_dict = data.num_columns
              first_col = list(col_dict.keys())[0]
              if "train" in data_dict:
                  df = data["train"].to_pandas()
              else:
                  df = data[first_col].to_pandas()
              # csv has issues with escaping chars, even for datasets I know I want
              df.to_parquet(out_file, index=False)
      except Exception as e:
          t, v, tb = sys.exc_info()
          ex = "".join(traceback.format_exception(t, v, tb))
          print("Exception: %s %s" % (data_id, ex), flush=True)
  
imports: import ast
  import concurrent.futures
  import contextlib
  import hashlib
  import json
  import os
  import shutil
  import signal
  import sys
  import traceback
  from concurrent.futures import ProcessPoolExecutor
  import psutil
  import pytest
  import pandas
  import numpy
  from tqdm import tqdm
  from utils import flatten_list, remove
  from joblib import Parallel, delayed, effective_n_jobs
  from sklearn.utils import gen_even_slices
  from sklearn.utils.validation import _num_samples
label_desc: Use image node_id 21 for calling a global function with example usage: do_one(data_id, num_downloads) without return types