code: def assign_to_param(self, tensor, param, numel, shape):
      tensor_id = id(tensor)
  
      assert (
          tensor_id in self.tensor_map.keys()
      ), "No such tensor allocated by the allocator."
      assert (
          tensor.numel() >= numel
      ), "Assert tensor buffer does is not large enough"
      assert (
          not tensor_id in self.id_to_params.keys()
      ), "This tensor has already been assigned to a param"
  
      self.id_to_params[tensor_id] = [param]
  
      replicated_tensor = tensor.narrow(0, 0, numel).view(shape)
      param.data = replicated_tensor.data
      param.contiguous_tensor_id = tensor_id
  
imports: import torch
  from deepspeed import comm
label_desc: Use image node_id 3 for calling the ContiguousMemoryAllocator obj's underlying member method code with example usage: obj.assign_to_param(tensor, param, numel, shape) without return types