code: def _allocate_and_return_buffers_for_swap_in(self, params):
      compute_buffers = []
      swap_buffers = []
  
      for param in params:
          param_id = param.ds_id
          assert (
              param_id in self.param_id_to_numel.keys()
          ), f" Number of elements in param {param_id} is unknown"
          assert (
              param_id not in self.param_id_to_buffer_id.keys()
          ), f"param {param_id} already assigned swap buffer id {self.param_id_to_buffer_id[param_id]}"
          assert (
              param_id not in self.param_id_to_swap_buffer.keys()
          ), f"param {param_id} has already been assigned a swap buffer"
  
          buffer_id = self.available_buffer_ids.pop()
          print_rank_0(
              f"param {param.ds_id} is assigned swap in buffer id {buffer_id}  "
          )
          self.param_id_to_buffer_id[param_id] = buffer_id
          aligned_swap_numel = self._io_aligned_numel(
              self.param_id_to_numel[param_id]
          )
          swap_buffer = self.buffers.narrow(
              0,
              int(buffer_id * self.aligned_elements_per_buffer),
              aligned_swap_numel,
          )
  
          self.param_id_to_swap_buffer[param_id] = swap_buffer
          compute_buffer = swap_buffer.narrow(
              0, 0, self.param_id_to_numel[param_id]
          )
          compute_buffers.append(compute_buffer)
          swap_buffers.append(swap_buffer)
  
      return compute_buffers, swap_buffers
  
imports: import os
  import shutil
  from enum import Enum
  import torch
  from deepspeed import comm
  from deepspeed.accelerator import get_accelerator
  from deepspeed.ops.op_builder import AsyncIOBuilder
  from .constants import *
  from .utils import swap_in_tensors, swap_out_tensors, MIN_AIO_BYTES, AIO_ALIGNED_BYTES, print_object, SwapBufferPool
label_desc: Use image node_id 9 for calling the AsyncPartitionedParameterSwapper obj's underlying member method code with example usage: obj._allocate_and_return_buffers_for_swap_in(params) and returns: compute_buffers,  swap_buffers