code: def __init__(self, configs: dict = {}):
      self._logical_rules = [
          LogicalInnerJoinCommutativity(),
          CacheFunctionExpressionInApply(),
          CacheFunctionExpressionInFilter(),
          CacheFunctionExpressionInProject(),
      ]
  
      self._stage_one_rewrite_rules = [
          XformLateralJoinToLinearFlow(),
          XformExtractObjectToLinearFlow(),
      ]
  
      self._stage_two_rewrite_rules = [
          EmbedFilterIntoGet(),
          # EmbedFilterIntoDerivedGet(),
          EmbedSampleIntoGet(),
          PushDownFilterThroughJoin(),
          PushDownFilterThroughApplyAndMerge(),
          CombineSimilarityOrderByAndLimitToVectorIndexScan(),
          ReorderPredicates(),
      ]
  
      self._implementation_rules = [
          LogicalCreateToPhysical(),
          LogicalCreateFromSelectToPhysical(),
          LogicalRenameToPhysical(),
          LogicalCreateFunctionToPhysical(),
          LogicalCreateFunctionFromSelectToPhysical(),
          LogicalDropObjectToPhysical(),
          LogicalInsertToPhysical(),
          LogicalDeleteToPhysical(),
          LogicalLoadToPhysical(),
          LogicalGetToSeqScan(),
          LogicalDerivedGetToPhysical(),
          LogicalUnionToPhysical(),
          LogicalGroupByToPhysical(),
          LogicalOrderByToPhysical(),
          LogicalLimitToPhysical(),
          LogicalJoinToPhysicalNestedLoopJoin(),
          LogicalLateralJoinToPhysical(),
          LogicalJoinToPhysicalHashJoin(),
          LogicalFunctionScanToPhysical(),
          LogicalFilterToPhysical(),
          LogicalShowToPhysical(),
          LogicalExplainToPhysical(),
          LogicalCreateIndexToVectorIndex(),
          LogicalVectorIndexScanToPhysical(),
          LogicalProjectNoTableToPhysical(),
      ]
  
      # These rules are enabled only if
      # (1) ray is installed and (2) ray is enabled
      # Ray must be installed using pip
      # It must also be enabled using the SET command
      # NOTE: By default, it is not enabled
      ray_enabled = configs.get("ray", False)
      if is_ray_enabled_and_installed(ray_enabled):
          self._implementation_rules.extend(
              [
                  LogicalExchangeToPhysical(),
                  LogicalApplyAndMergeToRayPhysical(),
                  LogicalProjectToRayPhysical(),
              ]
          )
      else:
          self._implementation_rules.extend(
              [
                  LogicalApplyAndMergeToPhysical(),
                  LogicalProjectToPhysical(),
              ]
          )
      self._all_rules = (
          self._stage_one_rewrite_rules
          + self._stage_two_rewrite_rules
          + self._logical_rules
          + self._implementation_rules
      )
  
file_path: evadb/evadb/optimizer/rules/rules_manager.py
imports: from __future__ import annotations
  from contextlib import contextmanager
  from typing import List
  from evadb.optimizer.rules.rules import CacheFunctionExpressionInApply, CacheFunctionExpressionInFilter, CacheFunctionExpressionInProject, CombineSimilarityOrderByAndLimitToVectorIndexScan, EmbedFilterIntoGet, EmbedSampleIntoGet, LogicalApplyAndMergeToPhysical, LogicalApplyAndMergeToRayPhysical, LogicalCreateFromSelectToPhysical, LogicalCreateFunctionFromSelectToPhysical, LogicalCreateFunctionToPhysical, LogicalCreateIndexToVectorIndex, LogicalCreateToPhysical, LogicalDeleteToPhysical, LogicalDerivedGetToPhysical, LogicalDropObjectToPhysical, LogicalExchangeToPhysical, LogicalExplainToPhysical, LogicalFilterToPhysical, LogicalFunctionScanToPhysical, LogicalGetToSeqScan, LogicalGroupByToPhysical, LogicalInnerJoinCommutativity, LogicalInsertToPhysical, LogicalJoinToPhysicalHashJoin, LogicalJoinToPhysicalNestedLoopJoin, LogicalLateralJoinToPhysical, LogicalLimitToPhysical, LogicalLoadToPhysical, LogicalOrderByToPhysical, LogicalProjectNoTableToPhysical, LogicalProjectToPhysical, LogicalProjectToRayPhysical, LogicalRenameToPhysical, LogicalShowToPhysical, LogicalUnionToPhysical, LogicalVectorIndexScanToPhysical, PushDownFilterThroughApplyAndMerge, PushDownFilterThroughJoin, ReorderPredicates, XformExtractObjectToLinearFlow, XformLateralJoinToLinearFlow
  from evadb.optimizer.rules.rules_base import Rule
  from evadb.utils.generic_utils import is_ray_enabled_and_installed
label_desc: Use image node_id 1 to create a new RulesManager object  with example: obj = RulesManager(configs)