code: def dataset_exists(path, impl):
      if impl == "mmap":
          return MMapIndexedDataset.exists(path)
      else:
          return IndexedDataset.exists(path)
  
imports: import os
  import shutil
  import struct
  from functools import lru_cache
  from itertools import accumulate
  import numpy
  import torch
label_desc: Use image node_id 6 for calling a global function with example usage: dataset_exists(path, impl) and returns: MMapIndexedDataset, IndexedDataset