code: def __init__(
      self, param: torch.nn.Parameter, set_data_none: bool = False
  ) -> None:
      self._sharded_data_tensor: ShardedTensor = ShardedTensor(
          param.data
      )
      self.saved_grad: StatefulTensor = StatefulTensor(
          None, TensorState.FREE
      )
      # This attribute must be initialized in ShardedModel
      self.offload_grad: bool = False
  
      # make sure the shared param is the only owner of payload
      # The param.data maybe used to init the other part of the model.
      # For example: File "resnet.py", line 190, in __init__
      # nn.init.kaiming_normal_(m.weight, mode='fan_out', nonlinearity='relu')
      # So we can not empty the .data at this time
      self.param = param
      if set_data_none:
          self.set_data_none()
  
file_path: colossalai/colossalai/legacy/zero/sharded_param/sharded_param.py
imports: from typing import List, Optional, Tuple
  import torch
  from colossalai.legacy.zero.gemini.stateful_tensor import StatefulTensor, TensorState
  from colossalai.legacy.zero.gemini.tensor_utils import colo_tensor_mem_usage
  from .sharded_tensor import ShardedTensor
label_desc: Use image node_id 1 to create a new ShardedParamV2 object from inherited base classes: object with example: obj = ShardedParamV2(param, set_data_none)