code: def save_to_disk(dataset: Any, filename: str, compress: int = 3):
      """Save a dataset to file.
  
      Parameters
      ----------
      dataset: str
          A data saved
      filename: str
          Path to save data.
      compress: int, default 3
          The compress option when dumping joblib file.
      """
      if filename.endswith(".joblib"):
          joblib.dump(dataset, filename, compress=compress)
      elif filename.endswith(".npy"):
          np.save(filename, dataset)
      else:
          raise ValueError(
              "Filename with unsupported extension: %s" % filename
          )
  
imports: import joblib
  import gzip
  import pickle
  import os
  import tempfile
  import tarfile
  import zipfile
  import logging
  from urllib.request import urlretrieve
  from typing import Any, Iterator, List, Optional, Tuple, Union, cast, IO
  import pandas
  import numpy
  import deepchem
label_desc: Use image node_id 14 for calling a global function with example usage: save_to_disk(dataset, filename, compress) without return types