import math


def round_repeats(repeats, depth_coefficient):
    """Calculate module's repeat number of a block based on depth multiplier.
       Use depth_coefficient.
    Args:
        repeats (int): num_repeat to be calculated.
        depth_coefficient (int): the depth coefficient of the model. this func uses it as the multiplier.
    Returns:
        new repeat: New repeat number after calculating.
    """
    if not depth_coefficient:
        return repeats
    # follow the formula transferred from official TensorFlow implementation
    return int(math.ceil(depth_coefficient * repeats))