code: def test_phase_state_validation(self) -> None:
      with self.assertRaisesRegex(
          ValueError, "Invalid value provided for max_epochs"
      ):
          PhaseState(dataloader=[], max_epochs=-2)
      with self.assertRaisesRegex(
          ValueError, "Invalid value provided for max_steps"
      ):
          PhaseState(dataloader=[], max_steps=-2)
      with self.assertRaisesRegex(
          ValueError, "Invalid value provided for max_steps_per_epoch"
      ):
          PhaseState(dataloader=[], max_steps_per_epoch=-2)
      with self.assertRaisesRegex(
          ValueError,
          "Invalid value provided for evaluate_every_n_steps",
      ):
          PhaseState(dataloader=[], evaluate_every_n_steps=-2)
      with self.assertRaisesRegex(
          ValueError,
          "Invalid value provided for evaluate_every_n_epochs",
      ):
          PhaseState(dataloader=[], evaluate_every_n_epochs=-2)
  
imports: import unittest
  from torchtnt.framework.state import _check_loop_condition, PhaseState
label_desc: Use image node_id 2 for calling the StateTest obj's underlying member method code with example usage: obj.test_phase_state_validation() without return types