class_docstr: WhereGenerator is a generic class to generate strategies for Where operation.
class_docstr_tok: ["WhereGenerator","is","a","generic","class","to","generate","strategies","for","Where","operation","."]
code: def update_compute_cost(self, strategy: ShardingStrategy):
      compute_cost = TrainCycleItem(fwd=10, bwd=10, total=20)
      strategy.compute_cost = compute_cost
  
file_path: ColossalAI/colossalai/auto_parallel/tensor_shard/node_handler/strategy/where_generator.py
imports: import copy
  from typing import List
  from colossalai.auto_parallel.tensor_shard.sharding_strategy import MemoryCost, ShardingStrategy, TrainCycleItem
  from colossalai.auto_parallel.tensor_shard.utils import enumerate_all_possible_1d_sharding, enumerate_all_possible_2d_sharding, ignore_sharding_exception
  from .strategy_generator import StrategyGenerator
label_desc: Use image node_id 2 for calling the WhereGenerator obj's underlying member method code with example usage: obj.update_compute_cost(strategy) without return types