code: def default_key_to_path(key, dfmt="{}", ffmt="{}.npy"):
      
      if isinstance(key, tuple):
          paths = [dfmt.format(k) for k in key[:-1]]
          paths += [ffmt.format(key[-1])]
          return os.path.join(*paths)
      else:
          return ffmt.format(key)
docs: Turn an arbitrary python object into a filename
  
      This uses string formatting, so make sure your keys map
      to unique strings. If the key is a tuple, it will join each
      element of the tuple with '/', resulting in a filesystem
      hierarchy of files.