code: def get_filesystem(filename):
      
      filename = compat.as_str_any(filename)
      prefix = ""
      index = filename.find("://")
      if index >= 0:
          prefix = filename[:index]
      fs = _REGISTERED_FILESYSTEMS.get(prefix, None)
      if fs is None:
          raise ValueError("No recognized filesystem for prefix %s" % prefix)
      return fs
docs: Return the registered filesystem for the given file.