code: def swap_out_optimizer_state(self, parameter, async_swap=False):
      swap_info = self._get_param_swap_info(parameter=parameter)
  
      if swap_info is None:
          return
  
      self._start_timer(SWAP_OUT_PARAM_TIMER)
      (
          pinned_tensors,
          pinned_paths,
          unpinned_tensors,
          unpinned_paths,
      ) = self._separate_pinned_tensors(swap_info)
      swap_bytes = sum(
          [
              self._io_aligned_numel(t.numel()) * t.element_size()
              for t in swap_info.tensors
          ]
      )
  
      WRITE_TIMER = "swap_submit_write"
      self._start_timer(WRITE_TIMER)
  
      swap_out_tensors(self.aio_handle, pinned_tensors, pinned_paths)
      assert self.aio_handle.wait() == len(pinned_tensors)
      for t in pinned_tensors:
          t.data = torch.Tensor()
  
      if len(unpinned_tensors) > 0:
          pinned_buffers = self.swap_buffer_manager.allocate_all(
              num_elems=self.largest_numel, dtype=self.dtype
          )
          self._swap_out_unpinned_tensors(
              aio_handle=self.aio_handle,
              unpinned_tensors=unpinned_tensors,
              dest_paths=unpinned_paths,
              pinned_buffers=pinned_buffers,
          )
          self.allocated_swap_buffers += pinned_buffers
  
          for t in unpinned_tensors:
              t.data = torch.Tensor()
      self._stop_timer(WRITE_TIMER)
  
      self.swap_buffer_manager.free(self.allocated_swap_buffers)
      self.allocated_swap_buffers = []
  
      self._stop_timer(SWAP_OUT_PARAM_TIMER)
      self.timer_names.add(SWAP_OUT_PARAM_TIMER)
  
      self._log_timers([WRITE_TIMER])
  
      if DEBUG_MODE and dist.get_rank() == 0:
          logger.info(
              f"optimizer_param_swap_out: {(swap_bytes/(1024**3)):5.2f} GB"
          )
  
imports: import torch
  from deepspeed.utils.logging import logger
  from deepspeed.ops.op_builder import AsyncIOBuilder
  from deepspeed import comm
  from deepspeed.runtime.swap_tensor.constants import *
  from deepspeed.runtime.swap_tensor.utils import swap_in_tensors, swap_out_tensors, print_object, get_sized_buffers
  from deepspeed.runtime.swap_tensor.async_swapper import AsyncTensorSwapper
  from deepspeed.runtime.swap_tensor.optimizer_utils import OptimizerSwapper
  from deepspeed.accelerator import get_accelerator
label_desc: Use image node_id 6 for calling the PartitionedOptimizerSwapper obj's underlying member method code with example usage: obj.swap_out_optimizer_state(parameter, async_swap) without return types