code: def _get_filesystem_path(path, filesystem=None, storage_options=None):
      """
      Get the filesystem and path for a given filesystem and path.
  
      If the filesystem is not None then it's just returned as is.
      """
      import pyarrow
  
      if (
          isinstance(path, str)
          and storage_options is None
          and filesystem is None
          and Version(pyarrow.__version__) >= Version("5.0.0")
      ):
          # Use the native pyarrow filesystem if possible.
          try:
              from pyarrow.fs import FileSystem
  
              filesystem, path = FileSystem.from_uri(path)
          except Exception:
              # fallback to use get_handle / fsspec for filesystems
              # that pyarrow doesn't support
              pass
  
      if _is_fsspec_url(path) and filesystem is None:
          fsspec = import_optional_dependency(
              "fsspec", extra="fsspec is requred for 'storage_options'."
          )
          filesystem, path = fsspec.core.url_to_fs(
              path, **(storage_options or {})
          )
  
      if filesystem is None and storage_options:
          raise ValueError(
              "Cannot provide 'storage_options' with non-fsspec path '{}'".format(
                  path
              )
          )
  
      return filesystem, path
  
imports: from packaging.version import Version
  import json
  import warnings
  import numpy
  from pandas import DataFrame, Series
  from geopandas._compat import import_optional_dependency
  from geopandas.array import from_wkb
  from geopandas import GeoDataFrame
  import geopandas
  from .file import _expand_user
label_desc: Use image node_id 12 for calling a global function with example usage: _get_filesystem_path(path, filesystem, storage_options) and returns: filesystem,  path