code: def update_compute_cost(
      self, strategy: ShardingStrategy
  ) -> ShardingStrategy:
      # C = AB
      # C: [M, N], A: [M, P], B: [P, N]
      # fwd cost = MNP (only count mul)
      # bwd: 2 x fwd_cost
      sharded_input_shape = strategy.sharding_specs[
          self.op_data["input"]
      ].get_sharded_shape_per_device()
      sharded_other_shape = strategy.sharding_specs[
          self.op_data["other"]
      ].get_sharded_shape_per_device()
      dim_m_val = reduce(operator.mul, sharded_input_shape[:-1])
      dim_n_val = sharded_other_shape[-1]
      dim_p_val = sharded_other_shape[0]
  
      fwd_compute_cost = dim_m_val * dim_n_val * dim_p_val
      bwd_compute_cost = fwd_compute_cost * 2
      compute_cost = TrainCycleItem(
          fwd=bwd_compute_cost,
          bwd=bwd_compute_cost,
          total=fwd_compute_cost + bwd_compute_cost,
      )
      strategy.compute_cost = compute_cost
  
imports: import operator
  from functools import reduce
  from typing import List
  from colossalai.auto_parallel.tensor_shard.options import SolverPerference
  from colossalai.auto_parallel.tensor_shard.sharding_strategy import CommType, MemoryCost, ShardingStrategy, TrainCycleItem
  from colossalai.auto_parallel.tensor_shard.utils import ignore_sharding_exception
  from colossalai.tensor.shape_consistency import CollectiveCommPattern
  from .strategy_generator import StrategyGenerator
label_desc: Use image node_id 2 for calling the LinearProjectionStrategyGenerator obj's underlying member method code with example usage: obj.update_compute_cost(strategy) without return types