code: def load_arviz_data(dataset=None, data_home=None):
      
      if dataset in LOCAL_DATASETS:
          resource = LOCAL_DATASETS[dataset]
          return from_netcdf(resource.filename)
  
      elif dataset in REMOTE_DATASETS:
          remote = REMOTE_DATASETS[dataset]
          home_dir = get_data_home(data_home=data_home)
          file_path = os.path.join(home_dir, remote.filename)
          if not os.path.exists(file_path):
              urlretrieve(remote.url, file_path)
          checksum = _sha256(file_path)
          if remote.checksum != checksum:
              raise IOError(
                  "{} has an SHA256 checksum ({}) differing from expected ({}), "
                  "file may be corrupted. Run `arviz.clear_data_home()` and try "
                  "again, or please open an issue.".format(file_path, checksum, remote.checksum)
              )
          return from_netcdf(file_path)
      else:
          raise ValueError(
              "Dataset {} not found! The following are available:\n{}".format(
                  dataset, list_datasets()
              )
          )
docs: Load a local or remote pre-made dataset.
  
      Run with no parameters to get a list of all available models.
  
      The directory to save to can also be set with the environement
      variable `ARVIZ_HOME`. The checksum of the dataset is checked against a
      hardcoded value to watch for data corruption.
  
      Run `az.clear_data_home` to clear the data directory.
  
      Parameters
      ----------
      dataset : str
          Name of dataset to load.
  
      data_home : str, optional
          Where to save remote datasets
  
      Returns
      -------
      xarray.Dataset