class_docstr: The MatMulHandler is a node handler which handles the sharding strategy generation for the matmul operation.
  According to https://pytorch.org/docs/stable/generated/torch.matmul.html, the operations will vary depending on
  the operands.
class_docstr_tok: ["The","MatMulHandler","is","a","node","handler","which","handles","the","sharding","strategy","generation","for","the","matmul","operation",".","According","to","https",":","\/\/pytorch.org\/docs\/stable\/generated\/torch.matmul.html",",","the","operations","will","vary","depending","on","the","operands","."]
code: def get_strategy_generator(self) -> List[StrategyGenerator]:
      generators = []
      op_data_mapping = self.get_operation_data_mapping()
      if self.matmul_type == MatMulType.BMM:
          generators.append(
              BatchedMatMulStrategyGenerator(
                  op_data_mapping, self.device_mesh
              )
          )
      elif self.matmul_type == MatMulType.DOT:
          generators.append(
              DotProductStrategyGenerator(
                  op_data_mapping, self.device_mesh
              )
          )
      elif self.matmul_type == MatMulType.MV:
          generators.append(
              MatVecStrategyGenerator(op_data_mapping, self.device_mesh)
          )
      elif self.matmul_type == MatMulType.MM:
          generators.append(
              LinearProjectionStrategyGenerator(
                  op_data_mapping,
                  self.device_mesh,
                  linear_projection_type="linear",
              )
          )
      return generators
  
imports: import operator
  from abc import ABC, abstractmethod
  from copy import deepcopy
  from enum import Enum
  from functools import reduce
  from typing import Dict, List, Union
  import torch
  from colossalai.auto_parallel.tensor_shard.utils.broadcast import BroadcastType, get_broadcast_dim_info, get_broadcast_shape
  from colossalai.tensor.sharding_spec import ShardingSpecException
  from ..sharding_strategy import OperationData, OperationDataType, ShardingStrategy
  from ..utils import recover_sharding_spec_for_broadcast_shape
  from .node_handler import MetaInfoNodeHandler
  from .registry import operator_registry
  from .strategy import BatchedMatMulStrategyGenerator, DotProductStrategyGenerator, LinearProjectionStrategyGenerator, MatVecStrategyGenerator, StrategyGenerator
label_desc: Use image node_id 2 for calling the MatMulHandler obj's underlying member method code with example usage: obj.get_strategy_generator() and returns: generators