code: def register_operand_based_optimization_rule(
      op_types: List[Type[OperandType]],
  ):
      def wrap(rule_type: Type[OperandBasedOptimizationRule]):
          for op_type in op_types:
              rule_type.register_operand(op_type)
          TileableOptimizer.register_rule(rule_type)
  
      return wrap
  
file_path: mars/mars/optimization/logical/tileable/core.py
imports: from typing import List, Type
  from ..core import Optimizer, OptimizationRule, OperandBasedOptimizationRule, OptimizationRecords
  from ....core import OperandType, TileableGraph
label_desc: Use image node_id 2 for calling a global function with example usage: register_operand_based_optimization_rule(op_types) and returns: wrap