class_docstr: Handles partitioning and gathering of parameters.
docstr: adds sub module to trace
docstr_tok: ["adds","sub","module","to","trace"]
code: def record_parameters(self, sub_module: Module) -> None:
      """adds sub module to trace"""
      if not self.is_record_trace():
          raise RuntimeError(
              f"attempted to record trace when status = {self.__trace_mode}"
          )
  
      step_id = self.__step_id_module_fetched_for[
          sub_module.id
      ].popleft()
      for param in sorted(
          set(iter_params(sub_module)), key=lambda p: p.ds_id
      ):
          self.__param_order.append(
              __class__.__ParamInTrace(
                  param=param, step_id_last_used_at=step_id
              )
          )
  
imports: from dataclasses import dataclass
  import collections
  from collections import UserDict
  from typing import Deque, Set
  from torch.cuda import Event, Stream
  from deepspeed import comm
  from deepspeed.utils.logging import logger
  from deepspeed.runtime.zero.offload_config import OffloadDeviceEnum
  from deepspeed.runtime.zero.partition_parameters import *
  from deepspeed.runtime.swap_tensor.partitioned_param_swapper import PartitionedParamStatus
  from deepspeed.utils.debug import debug_module2name_id, debug_param2name_id
label_desc: Use image node_id 9 for calling the PartitionedParameterCoordinator obj's underlying member method code with example usage: obj.record_parameters(sub_module) without return types