code: def prepare_year(dataset_folder, nrows):
      url = (
          "https://archive.ics.uci.edu/ml/machine-learning-databases/00203/YearPredictionMSD.txt"
          ".zip"
      )
      local_url = os.path.join(dataset_folder, os.path.basename(url))
      pickle_url = os.path.join(
          dataset_folder,
          "year"
          + ("" if nrows is None else "-" + str(nrows))
          + "-pickle.dat",
      )
  
      if os.path.exists(pickle_url):
          return pickle.load(open(pickle_url, "rb"))
      print("Preparing dataset ...")
  
      if not os.path.isfile(local_url):
          urlretrieve(url, local_url)
      year = pd.read_csv(local_url, nrows=nrows, header=None)
      X = year.iloc[:, 1:]
      y = year.iloc[:, 0]
  
      if nrows is None:
          # this dataset requires a specific train/test split,
          # with the specified number of rows at the start belonging to the train set,
          # and the rest being the test set
          X_train, X_test, y_train, y_test = train_test_split(
              X, y, shuffle=False, train_size=463715, test_size=51630
          )
      else:
          print(
              "Warning: nrows is specified, not using predefined test/train split for "
              "YearPredictionMSD."
          )
          X_train, X_test, y_train, y_test = train_test_split(
              X,
              y,
              random_state=77,
              test_size=0.2,
          )
  
      data = Data(
          X_train.astype("|f4").to_numpy(),
          X_test.astype("|f4").to_numpy(),
          y_train,
          y_test,
          LearningTask.REGRESSION,
      )
      pickle.dump(data, open(pickle_url, "wb"), protocol=4)
      return data
  
imports: import os
  from enum import Enum
  import pandas
  import pickle
  import numpy
  from sklearn.model_selection import train_test_split
  from sklearn.datasets import load_svmlight_file
  from urllib.request import urlretrieve
label_desc: Use image node_id 5 for calling a global function with example usage: prepare_year(dataset_folder, nrows) and returns: data, pickle