code: def _test_schedule(self, schedule, values):
      self.assertEqual(schedule.num_steps, len(values))
      self.assertEqual(schedule.value, values[0])
      self.assertFalse(schedule.should_stop)
      for i in range(len(values) - 1):
          schedule.step()
          self.assertEqual(schedule.value, values[i + 1])
          self.assertFalse(schedule.should_stop)
      schedule.step()
      self.assertTrue(schedule.should_stop)
      schedule.restart()
      self.assertEqual(schedule.value, values[0])
      self.assertFalse(schedule.should_stop)
  
file_path: botorch/test/optim/test_homotopy.py
imports: import unittest.mock
  import torch
  from botorch.acquisition import PosteriorMean
  from botorch.acquisition.monte_carlo import qExpectedImprovement
  from botorch.models import GenericDeterministicModel
  from botorch.optim.homotopy import FixedHomotopySchedule, Homotopy, HomotopyParameter, LinearHomotopySchedule, LogLinearHomotopySchedule
  from botorch.optim.optimize_homotopy import optimize_acqf_homotopy, prune_candidates
  from botorch.utils.testing import BotorchTestCase
  from torch.nn import Parameter
label_desc: Use image node_id 1 for calling the TestHomotopy obj's underlying member method code with example usage: obj._test_schedule(schedule, values) without return types