code: def save_file(self, fd: IO, epoch_number: int, logs: Dict):
      states = {
          k: v.state_dict() for k, v in self.name_to_stateful.items()
      }
      torch.save(states, fd)
  
imports: import warnings
  from typing import IO, Dict
  import torch
  from poutyne.framework.callbacks.lr_scheduler import ReduceLROnPlateau, _PyTorchLRSchedulerWrapper
  from poutyne.framework.callbacks.periodic import PeriodicSaveCallback
  from poutyne.utils import load_random_states, save_random_states
label_desc: Use image node_id 2 for calling the StateCheckpoint obj's underlying member method code with example usage: obj.save_file(fd, epoch_number, logs) without return types