code: def which(self, path, mode="r"):
          # type: (Text, Text) -> Tuple[Optional[Text], Optional[FS]]
          
          if check_writable(mode):
              return self._write_fs_name, self.write_fs
          for name, fs in self.iterate_fs():
              if fs.exists(path):
                  return name, fs
          return None, None
docs: Get a tuple of (name, fs) that the given path would map to.
  
          Arguments:
              path (str): A path on the filesystem.
              mode (str): An `io.open` mode.