code: def test_ckpt_for_fsspec():
      """Test that the _CheckpointConnector is able to write to fsspec file systems."""
      model = BoringModel()
      # hardcoding dir since `tmpdir` can be windows path
      trainer = Trainer(
          default_root_dir="memory://test_ckpt_for_fsspec",
          limit_train_batches=1,
          limit_val_batches=1,
          max_epochs=1,
      )
      trainer.fit(model)
      trainer.save_checkpoint(
          "memory://test_ckpt_for_fsspec/hpc_ckpt.ckpt"
      )
      trainer.save_checkpoint(
          "memory://test_ckpt_for_fsspec/hpc_ckpt_0.ckpt"
      )
      trainer.save_checkpoint(
          "memory://test_ckpt_for_fsspec/hpc_ckpt_3.ckpt"
      )
      trainer.save_checkpoint(
          "memory://test_ckpt_for_fsspec/hpc_ckpt_33.ckpt"
      )
  
      assert (
          trainer._checkpoint_connector._hpc_resume_path
          == "memory://test_ckpt_for_fsspec/hpc_ckpt_33.ckpt"
      )
      assert (
          trainer._checkpoint_connector._CheckpointConnector__max_ckpt_version_in_folder(
              "memory://test_ckpt_for_fsspec"
          )
          == 33
      )
      assert (
          trainer._checkpoint_connector._CheckpointConnector__max_ckpt_version_in_folder(
              "memory://not_existing"
          )
          is None
      )
  
file_path: pytorch-lightning/tests/tests_pytorch/trainer/connectors/test_checkpoint_connector.py
imports: import os
  from unittest import mock
  from unittest.mock import Mock
  import pytest
  import torch
  from lightning.pytorch import Trainer
  from lightning.pytorch.callbacks import ModelCheckpoint
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.trainer.states import TrainerFn
  from lightning.pytorch.utilities.migration.utils import _set_version
label_desc: Use image node_id 4 for calling a global function with example usage: test_ckpt_for_fsspec() without return types