code: def test_is_dir_with_object_storage_filesystem():
      class MockAzureBlobFileSystem(AbstractFileSystem):
          def isdir(self, path):
              return path.startswith("azure://") and not path.endswith(
                  ".txt"
              )
  
          def isfile(self, path):
              return path.startswith("azure://") and path.endswith(
                  ".txt"
              )
  
      class MockGCSFileSystem(AbstractFileSystem):
          def isdir(self, path):
              return path.startswith("gcs://") and not path.endswith(
                  ".txt"
              )
  
          def isfile(self, path):
              return path.startswith("gcs://") and path.endswith(".txt")
  
      class MockS3FileSystem(AbstractFileSystem):
          def isdir(self, path):
              return path.startswith("s3://") and not path.endswith(
                  ".txt"
              )
  
          def isfile(self, path):
              return path.startswith("s3://") and path.endswith(".txt")
  
      fsspec.register_implementation(
          "azure", MockAzureBlobFileSystem, clobber=True
      )
      fsspec.register_implementation(
          "gcs", MockGCSFileSystem, clobber=True
      )
      fsspec.register_implementation(
          "s3", MockS3FileSystem, clobber=True
      )
  
      azure_directory = "azure://container/directory/"
      azure_file = "azure://container/file.txt"
      gcs_directory = "gcs://bucket/directory/"
      gcs_file = "gcs://bucket/file.txt"
      s3_directory = "s3://bucket/directory/"
      s3_file = "s3://bucket/file.txt"
  
      assert _is_dir(get_filesystem(azure_directory), azure_directory)
      assert _is_dir(
          get_filesystem(azure_directory), azure_directory, strict=True
      )
      assert not _is_dir(get_filesystem(azure_directory), azure_file)
      assert not _is_dir(
          get_filesystem(azure_directory), azure_file, strict=True
      )
  
      assert _is_dir(get_filesystem(gcs_directory), gcs_directory)
      assert _is_dir(
          get_filesystem(gcs_directory), gcs_directory, strict=True
      )
      assert not _is_dir(get_filesystem(gcs_directory), gcs_file)
      assert not _is_dir(
          get_filesystem(gcs_directory), gcs_file, strict=True
      )
  
      assert _is_dir(get_filesystem(s3_directory), s3_directory)
      assert _is_dir(
          get_filesystem(s3_directory), s3_directory, strict=True
      )
      assert not _is_dir(get_filesystem(s3_directory), s3_file)
      assert not _is_dir(
          get_filesystem(s3_directory), s3_file, strict=True
      )
  
file_path: pytorch-lightning/tests/tests_fabric/utilities/test_cloud_io.py
imports: import os
  import fsspec
  from fsspec.implementations.local import LocalFileSystem
  from fsspec.spec import AbstractFileSystem
  from lightning.fabric.utilities.cloud_io import _is_dir, get_filesystem
label_desc: Use image node_id 4 for calling a global function with example usage: test_is_dir_with_object_storage_filesystem() and returns: unknown, unknown, unknown, unknown, unknown, unknown