code: def _save_to_state_dict(module, destination, prefix, keep_vars):
      """Saves module state to `destination` dictionary.
  
      This method is modified from :meth:`torch.nn.Module._save_to_state_dict`.
  
      Args:
          module (nn.Module): The module to generate state_dict.
          destination (dict): A dict where state will be stored.
          prefix (str): The prefix for parameters and buffers used in this
              module.
      """
      for name, param in module._parameters.items():
          if param is not None:
              destination[prefix + name] = (
                  param if keep_vars else param.detach()
              )
      for name, buf in module._buffers.items():
          # remove check of _non_persistent_buffers_set to allow nn.BatchNorm2d
          if buf is not None:
              destination[prefix + name] = (
                  buf if keep_vars else buf.detach()
              )
  
imports: import io
  import os
  import os.path
  import pkgutil
  import re
  import time
  import warnings
  from collections import OrderedDict
  from importlib import import_module
  from tempfile import TemporaryDirectory
  import torch
  import torchvision
  from torch.optim import Optimizer
  from torch.utils import model_zoo
  import annotator.uniformer.mmcv
  from ..fileio import FileClient
  from ..fileio import load
  from ..parallel import is_module_wrapper
  from ..utils import mkdir_or_exist
  from .dist_utils import get_dist_info
label_desc: Use image node_id 19 for calling a global function with example usage: _save_to_state_dict(module, destination, prefix, keep_vars) without return types