def calc_step(epoch: int, n_batches: int, batch_index: int) -> int:
    """Calculates current step.

    Args:
        epoch (int): Current epoch.
        n_batches (int): Number of batches in dataloader.
        batch_index (int): Current batch index.

    Returns:
        int: Current step.
    """
    return (epoch - 1) * n_batches + (1 + batch_index)