def test_safetensors_load_from_local_from_safetensors_pt_without_torch_installed(self):
        """
        This test checks that we cannot load safetensors from a checkpoint that only has safetensors
        saved in the "pt" format if torch isn't installed.
        """
        if is_torch_available():
            # This test verifies that a correct error message is shown when loading from a pt safetensors
            # PyTorch shouldn't be installed for this to work correctly.
            return

        with tempfile.TemporaryDirectory() as tmp:
            location = snapshot_download("hf-internal-testing/tiny-bert-pt-safetensors", cache_dir=tmp)

            # Cannot load from the PyTorch-formatted checkpoint without PyTorch installed
            with self.assertRaises(ModuleNotFoundError):
                _ = FlaxBertModel.from_pretrained(location)

        This test checks that we cannot load safetensors from a checkpoint that only has safetensors
        saved in the "pt" format if torch isn't installed.
        
dpkd/transformers/tests/test_modeling_flax_utils.py