class_docstr: Parallelize model based on the given config and policy
  
  Example:
  
  ```python
  from colossalai.shardformer import ShardFormer, ShardConfig
  from transformers import BertForMaskedLM
  import colossalai
  import torch
  
  colossalai.launch_from_torch(config={})
  
  org_model = BertForMaskedLM.from_pretrained('bert-base-uncased')
  shard_config = ShardConfig()
  shard_former = ShardFormer(shard_config=shard_config)
  model, shared_params = shard_former.optimize(org_model)
  ```
code: def __init__(self, shard_config: ShardConfig):
      self.coordinator = DistCoordinator()
      self.shard_config = shard_config
  
file_path: colossalai/colossalai/shardformer/shard/shardformer.py
imports: from typing import Dict, List, Tuple
  import torch.nn
  from torch import Tensor
  from colossalai.cluster import DistCoordinator
  from ..policies.base_policy import Policy
  from .shard_config import ShardConfig
  from .sharder import ModelSharder
label_desc: Use image node_id 1 to create a new ShardFormer object  with example: obj = ShardFormer(shard_config)