def __getstate__(self):
    pg_state = ShardedTensor.ProcessGroupState(distributed_c10d.get_rank(self._process_group), distributed_c10d.get_rank(), distributed_c10d.get_world_size(self._process_group), distributed_c10d.get_world_size())
    return (self._local_shards, self._metadata, pg_state, self._sharding_spec, self._init_rrefs)
def __getstate__(self):
    pg_state = ShardedTensor.ProcessGroupState(distributed_c10d.get_rank(self._process_group), distributed_c10d.get_rank(), distributed_c10d.get_world_size(self._process_group), distributed_c10d.get_world_size())
    return (self._local_shards, self._metadata, pg_state, self._sharding_spec, self._init_rrefs)