code: def test_should_reorder_predicates(self, mock):
      def _check_reorder(cost_func):
          mock.side_effect = cost_func
  
          pred_1 = "DummyObjectDetector(data).label = ['person']"
          pred_2 = "DummyMultiObjectDetector(data).labels @> ['person']"
  
          query = f"SELECT id FROM MyVideo WHERE {pred_2} AND {pred_1};"
  
          plan = get_physical_query_plan(self.evadb, query)
          predicate_plans = list(plan.find_all(PredicatePlan))
          self.assertEqual(len(predicate_plans), 1)
  
          left: ComparisonExpression = predicate_plans[
              0
          ].predicate.children[0]
          right: ComparisonExpression = predicate_plans[
              0
          ].predicate.children[1]
  
          # predicates reordered based on the cost
          self.assertEqual(left.children[0].name, "DummyObjectDetector")
          self.assertEqual(
              right.children[0].name, "DummyMultiObjectDetector"
          )
  
      # reordering if first predicate has higher cost
      _check_reorder(
          lambda name: MagicMock(cost=10)
          if name == "DummyMultiObjectDetector"
          else MagicMock(cost=5)
      )
  
      # reordering if first predicate has no cost
      _check_reorder(
          lambda name: MagicMock(cost=5)
          if name == "DummyObjectDetector"
          else None
      )
  
imports: import unittest
  from test.markers import gpu_skip_marker
  from test.util import get_evadb_for_testing, get_physical_query_plan, load_functions_for_testing, shutdown_ray
  import numpy
  import pandas
  import pytest
  from mock import MagicMock, patch
  from evadb.configuration.constants import EvaDB_ROOT_DIR
  from evadb.expression.comparison_expression import ComparisonExpression
  from evadb.models.storage.batch import Batch
  from evadb.optimizer.plan_generator import PlanGenerator
  from evadb.optimizer.rules.rules import PushDownFilterThroughApplyAndMerge, PushDownFilterThroughJoin, ReorderPredicates
  from evadb.optimizer.rules.rules_manager import RulesManager, disable_rules
  from evadb.plan_nodes.predicate_plan import PredicatePlan
  from evadb.server.command_handler import execute_query_fetch_all
  from evadb.utils.stats import Timer
label_desc: Use image node_id 5 for calling the OptimizerRulesTest obj's underlying member method code with example usage: obj.test_should_reorder_predicates(mock) without return types