code: def dataset_from_name(dataset="deep1M", download=False):
      """converts a string describing a dataset to a Dataset object
      Supports sift1M, bigann1M..bigann1B, deep1M..deep1B, music-100 and glove
      """
  
      if dataset == "sift1M":
          return DatasetSIFT1M()
  
      elif dataset == "gist1M":
          return DatasetGIST1M()
  
      elif dataset.startswith("bigann"):
          dbsize = 1000 if dataset == "bigann1B" else int(dataset[6:-1])
          return DatasetBigANN(nb_M=dbsize)
  
      elif dataset.startswith("deep"):
          szsuf = dataset[4:]
          if szsuf[-1] == "M":
              dbsize = 10**6 * int(szsuf[:-1])
          elif szsuf == "1B":
              dbsize = 10**9
          elif szsuf[-1] == "k":
              dbsize = 1000 * int(szsuf[:-1])
          else:
              assert False, "did not recognize suffix " + szsuf
          return DatasetDeep1B(nb=dbsize)
  
      elif dataset == "music-100":
          return DatasetMusic100()
  
      elif dataset == "glove":
          return DatasetGlove(download=download)
  
      else:
          raise RuntimeError("unknown dataset " + dataset)
  
imports: import os
  import numpy
  import faiss
  from .vecs_io import fvecs_read, ivecs_read, bvecs_mmap, fvecs_mmap
  from .exhaustive_search import knn
label_desc: Use image node_id 2 for calling a global function with example usage: dataset_from_name(dataset, download) and returns: DatasetSIFT1M, DatasetGIST1M, DatasetBigANN, DatasetDeep1B, DatasetMusic100, DatasetGlove