code: def on_train_epoch_start(self, trainer, pl_module):
      super().on_train_epoch_start(trainer, pl_module)
      current_epoch = trainer.current_epoch
      modules: List[Module] = [
          pl_module.model.layer,
          pl_module.model.layer1,
      ]
      if current_epoch >= self.check_epochs[1]:
          for module in modules:
              for parameter in module.parameters():
                  assert parameter.requires_grad
      elif (
          current_epoch >= self.check_epochs[0]
          and current_epoch < self.check_epochs[1]
      ):
          for parameter in modules[0].parameters():
              assert not parameter.requires_grad
          for parameter in modules[1].parameters():
              assert parameter.requires_grad
      else:
          for module in modules:
              for parameter in module.parameters():
                  assert not parameter.requires_grad
  
imports: from numbers import Number
  from typing import Iterable, List, Optional, Tuple, Union
  import flash
  import pytest
  import pytorch_lightning
  import torch
  from flash.core.finetuning import _FINETUNING_STRATEGIES_REGISTRY
  from flash.core.model import Task
  from flash.core.utilities.imports import _DEEPSPEED_AVAILABLE, _TOPIC_CORE_AVAILABLE
  from pytorch_lightning.callbacks.model_checkpoint import ModelCheckpoint
  from torch import Tensor
  from torch.nn import Flatten, Linear, LogSoftmax, Module
  from torch.nn import functional
  from torch.utils.data import DataLoader
  from tests.helpers.boring_model import BoringModel
label_desc: Use image node_id 2 for calling the UnfreezeMilestonesStrategyChecking obj's underlying member method code with example usage: obj.on_train_epoch_start(trainer, pl_module) without return types