code: def _fetch_dataset(remote, data_home=None, check_md5hash=False):
      """Get a dataset.
  
      Gets the directory of a dataset. If the dataset is not found it is downloaded automatically.
  
      Parameters
      ----------
  
      remote: DatasetMetadata
          Named tuple containing remote datasets meta information: dataset name, dataset filename,
          url, train filename, validation filename, test filename, train checksum, valid checksum, test checksum.
      data_home: str
          The location to save the dataset to.
      check_md5hash: bool
          Whether to check the MD5 hash of the dataset file.
  
      Returns
      ------
  
      str
          The location of the dataset.
      """
      data_home = _get_data_home(data_home)
      dataset_dir = os.path.join(data_home, remote.dataset_name)
      if not os.path.exists(dataset_dir):
          if remote.url is None:
              msg = "No dataset at {} and no url provided.".format(
                  dataset_dir
              )
              logger.error(msg)
              raise Exception(msg)
  
          _fetch_remote_data(
              remote, dataset_dir, data_home, check_md5hash
          )
      return dataset_dir
  
imports: import hashlib
  import json
  import logging
  import os
  import urllib
  import zipfile
  from collections import namedtuple
  from pathlib import Path
  import numpy
  import pandas
label_desc: Use image node_id 6 for calling a global function with example usage: _fetch_dataset(remote, data_home, check_md5hash) and returns: dataset_dir