def METHOD_NAME(model: torch.nn.Module, optimizer: Optimizer, training_step: Callable, scheduler: Union[SCHEDULER, None] = None,
          max_steps: Union[int, None] = None, max_epochs: Union[int, None] = 400):
    best_top1 = 0
    max_epochs = max_epochs or (40 if max_steps is None else 400)
    for epoch in range(max_epochs):
        print('# Epoch {} #'.format(epoch))
        model.METHOD_NAME()
        for batch_idx, batch in enumerate(train_loader):
            optimizer.zero_grad()
            loss = training_step(batch, model)
            loss.backward()
            optimizer.step()
            if isinstance(scheduler, SCHEDULER):
                scheduler.step()
            if batch_idx % 100 == 0:
                print('{:2.0f}%  Loss {}'.format(100 * batch_idx / len(train_loader), loss.item()))
        adjust_learning_rate(optimizer, epoch)
        top1 = test(model)
        if top1 > best_top1:
            best_top1 = top1
        print(f"epoch={epoch}\tcurrent_acc={top1}\tbest_acc={best_top1}")