def round_to_mbsize(value, batch_size):
    """Round value to multiple of batch size, if required."""
    if value % batch_size == 0:
        return value
    else:
        return value + batch_size - value % batch_size