code: def test_torch_meta(tmpdir, device):
      from speechbrain.utils.checkpoints import Checkpointer
  
      class Recoverable(torch.nn.Module):
          def __init__(self, param):
              super().__init__()
              self.param = torch.nn.Parameter(
                  torch.tensor([param], device=device)
              )
  
          def forward(self, x):
              return x * self.param
  
      recoverable = Recoverable(1.0)
      recoverables = {"recoverable": recoverable}
      recoverer = Checkpointer(tmpdir, recoverables)
      saved = recoverer.save_checkpoint(
          meta={
              "loss": torch.tensor(
                  [1.0, 2.0, 3.0, 4.0, 5.0], device=device
              )
          }
      )
      loaded = recoverer.recover_if_possible()
      assert saved.meta["loss"].allclose(loaded.meta["loss"])
  
file_path: speechbrain/tests/unittests/test_checkpoints.py
imports: import torch
  import pytest
label_desc: Use image node_id 6 for calling a global function with example usage: test_torch_meta(tmpdir, device) and returns: unknown