docs: def open_vos_or_local(path, mode="rb"):
      """
      Opens a file which can either be in VOSpace or the local filesystem.
  
      @param path:
      @param mode:
      @return:
      """
      filename = os.path.basename(path)
      if os.access(filename, os.F_OK):
          return open(filename, mode)
      if path.startswith("vos:"):
          primary_mode = mode[0]
          if primary_mode == "r":
              vofile_mode = os.O_RDONLY
          elif primary_mode == "w":
              vofile_mode = os.O_WRONLY
          elif primary_mode == "a":
              vofile_mode = os.O_APPEND
          else:
              raise ValueError("Can't open with mode %s" % mode)
  
          return vofile(path, mode=vofile_mode)
      else:
          return open(path, mode)