def build_valid_training_set(pass_level, pass1_max, pass2_max, reduce_max):
    """
    We need to evaluate how well the auto-labelling process has worked per pass.
    How many fields have we managed to extract (max) and how many forms in the training set
    have we managed to extract the max for. We will need to decrement if we cannot hit our
    minimum threshold of 10 forms required for training

    :param pass_level: The dict object containing our auto-labelling results
    :param pass1_max: The maximum fields extracted during autolabel pass 1
    :param pass2_max: The maximum fields extracted during autolabel pass 2
    :param reduce_max: We decrement if we cannot find fully labelled forms
    :return: The counts and sums per pass as ints
    """
    pass1_count = 0
    pass2_count = 0
    pass1_sum = 0
    pass2_sum = 0

    for level, file_values in pass_level.items():
        for file_value in file_values:
            for _, key_count in enumerate(file_value):
                if int(level) == 1:
                    pass1_sum += int(key_count[1])
                    if int(key_count[1]) == (pass1_max - reduce_max):
                        pass1_count += 1
                else:
                    pass2_sum += int(key_count[1])
                    if int(key_count[1]) == (pass2_max - reduce_max):
                        pass2_count += 1

    return pass1_count, pass2_count, pass1_sum, pass2_sum