class_docstr: Defines the different optimizers that should be used at each level.
class_docstr_tok: ["Defines","the","different","optimizers","that","should","be","used","at","each","level","."]
docstr: Return the optimizers that should be applied (in order) for each level.
docstr_tok: ["Return","the","optimizers","that","should","be","applied","(","in","order",")","for","each","level","."]
code: def optimizers_for_level(
      level: SqlQueryOptimizationLevel,
      use_column_alias_in_group_by: bool,
  ) -> Sequence[SqlQueryPlanOptimizer]:
      """Return the optimizers that should be applied (in order) for each level."""
      if level is SqlQueryOptimizationLevel.O0:
          return ()
      elif level is SqlQueryOptimizationLevel.O1:
          return (SqlTableAliasSimplifier(),)
      elif level is SqlQueryOptimizationLevel.O2:
          return (SqlColumnPrunerOptimizer(), SqlTableAliasSimplifier())
      elif level is SqlQueryOptimizationLevel.O3:
          return (
              SqlColumnPrunerOptimizer(),
              SqlSubQueryReducer(),
              SqlTableAliasSimplifier(),
          )
      elif level is SqlQueryOptimizationLevel.O4:
          return (
              SqlColumnPrunerOptimizer(),
              SqlRewritingSubQueryReducer(
                  use_column_alias_in_group_bys=use_column_alias_in_group_by
              ),
              SqlTableAliasSimplifier(),
          )
  
file_path: metricflow/metricflow/sql/optimizer/optimization_levels.py
imports: from __future__ import annotations
  from enum import Enum
  from typing import Sequence
  from metricflow.sql.optimizer.column_pruner import SqlColumnPrunerOptimizer
  from metricflow.sql.optimizer.rewriting_sub_query_reducer import SqlRewritingSubQueryReducer
  from metricflow.sql.optimizer.sql_query_plan_optimizer import SqlQueryPlanOptimizer
  from metricflow.sql.optimizer.sub_query_reducer import SqlSubQueryReducer
  from metricflow.sql.optimizer.table_alias_simplifier import SqlTableAliasSimplifier
label_desc: Use image node_id 1 for calling the SqlQueryOptimizerConfiguration obj's underlying member method code with example usage: obj.optimizers_for_level(level, use_column_alias_in_group_by) and returns: , SqlTableAliasSimplifier, SqlColumnPrunerOptimizer,  SqlTableAliasSimplifier, SqlColumnPrunerOptimizer,  SqlSubQueryReducer,  SqlTableAliasSimplifier, SqlColumnPrunerOptimizer,  SqlRewritingSubQueryReducer,  SqlTableAliasSimplifier