class_docstr: FollowingStrategyGenerator is used to generate the sharding strategies which depends on its predecessor node.
  
  TODO: remove the original strategy_generator.py after refactoring
class_docstr_tok: ["FollowingStrategyGenerator","is","used","to","generate","the","sharding","strategies","which","depends","on","its","predecessor","node",".","TODO",":","remove","the","original","strategy_generator.py","after","refactoring"]
code: def __init__(
      self,
      operation_data_mapping: Dict[str, OperationData],
      device_mesh: DeviceMesh,
      predecessor_node: Node,
  ):
      self.op_data = operation_data_mapping
      self.device_mesh = device_mesh
      self.predecessor_node = predecessor_node
  
imports: import operator
  from abc import ABC, abstractmethod
  from functools import reduce
  from typing import Any, Dict, List, Union
  import torch
  from torch.fx import Node
  from colossalai.auto_parallel.tensor_shard.sharding_strategy import CommAction, CommType, OperationData, OperationDataType, ShardingStrategy, TrainCycleItem
  from colossalai.device.device_mesh import DeviceMesh
  from colossalai.tensor.shape_consistency import CollectiveCommPattern, CommSpec, ShapeConsistencyManager
  from colossalai.tensor.sharding_spec import ShardingSpec
  from colossalai.tensor.utils import convert_dim_partition_dict
label_desc: Use image node_id 1 to create a new FollowingStrategyGenerator object from inherited base classes: StrategyGenerator with example: obj = FollowingStrategyGenerator(operation_data_mapping, device_mesh, predecessor_node)