code: def test_StatusQuo(self) -> None:
      tot_weight = sum(self.batch.weights)
      new_sq = Arm(
          parameters={"w": 0.95, "x": 1, "y": "foo", "z": True}
      )
  
      # Test negative weight
      with self.assertRaises(ValueError):
          self.batch.set_status_quo_with_weight(new_sq, -1)
  
      # Test that directly setting the status quo raises an error
      with self.assertRaises(NotImplementedError):
          self.batch.status_quo = new_sq
  
      # Set status quo to new arm
      self.batch.set_status_quo_with_weight(new_sq, self.sq_weight)
      self.assertTrue(self.batch.status_quo == new_sq)
      self.assertEqual(self.batch.status_quo.name, "status_quo_0")
      self.assertEqual(
          sum(self.batch.weights), tot_weight + self.sq_weight
      )
      # sq weight should be ignored when sq is None
      self.batch.unset_status_quo()
      self.assertEqual(sum(self.batch.weights), tot_weight)
  
      # Verify experiment status quo gets set on init
      self.experiment.status_quo = self.status_quo
      batch2 = self.batch.clone()
      self.assertEqual(batch2.status_quo, self.experiment.status_quo)
  
      # Since optimize_for_power was not set, the weight override should not be
      # And the status quo shoudl not appear in arm_weights
      self.assertIsNone(batch2._status_quo_weight_override)
      self.assertTrue(batch2.status_quo not in batch2.arm_weights)
      self.assertEqual(sum(batch2.weights), sum(self.weights))
  
      # Try setting sq to existing arm with different name
      with self.assertRaises(ValueError):
          self.batch.set_status_quo_with_weight(
              Arm(new_sq.parameters, name="new_name"), 1
          )
  
imports: import math
  from time import sleep
  from unittest import mock
  from unittest.mock import patch, PropertyMock
  import numpy
  from ax.core.arm import Arm
  from ax.core.base_trial import TrialStatus
  from ax.core.batch_trial import BatchTrial, GeneratorRunStruct
  from ax.core.experiment import Experiment
  from ax.core.generator_run import GeneratorRun, GeneratorRunType
  from ax.core.parameter import FixedParameter, ParameterType
  from ax.core.search_space import SearchSpace
  from ax.runners.synthetic import SyntheticRunner
  from ax.utils.common.testutils import TestCase
  from ax.utils.common.typeutils import checked_cast
  from ax.utils.testing.core_stubs import get_abandoned_arm, get_arm, get_arm_weights1, get_arms, get_experiment, get_generator_run, get_generator_run2, get_weights
label_desc: Use image node_id 10 for calling the BatchTrialTest obj's underlying member method code with example usage: obj.test_StatusQuo() without return types