code: def swap_in_optimizer_state(self, parameter, async_parameter=None):
      swap_info = self._get_param_swap_info(parameter)
      if swap_info is None:
          return
  
      self._flush_gradient_swapper(self.gradient_swapper)
  
      required_buffer_count = len(swap_info.tensors) + (
          1 if swap_info.has_gradients() else 0
      )
      aligned_numel = self._io_aligned_numel(swap_info.numel())
      pinned_buffers = self.swap_buffer_manager.allocate(
          num_elems=aligned_numel,
          count=required_buffer_count,
          dtype=parameter.dtype,
      )
      assert pinned_buffers is not None
      self.allocated_swap_buffers = pinned_buffers.copy()
  
      self._start_timer(SWAP_IN_PARAM_TIMER)
      self._swap_in_parameter(
          aio_handle=self.aio_handle,
          parameter=parameter,
          dest_buffers=pinned_buffers[:required_buffer_count],
      )
      self._stop_timer(SWAP_IN_PARAM_TIMER)
      self.timer_names.add(SWAP_IN_PARAM_TIMER)
  
      self._start_timer(SWAP_IN_GRADIENT_TIMER)
      self._swap_in_gradients(
          aio_handle=self.aio_handle,
          parameter=parameter,
          dest_buffer=pinned_buffers[-1],
      )
      self._stop_timer(SWAP_IN_GRADIENT_TIMER)
      self.timer_names.add(SWAP_IN_GRADIENT_TIMER)
  
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 5 for calling the PartitionedOptimizerSwapper obj's underlying member method code with example usage: obj.swap_in_optimizer_state(parameter, async_parameter) without return types