(startdate, enddate, domains, should_create=False)
return missing_forms_per_domain
:param startdate: search for missing form repeat records after this date
    :param enddate: search for missing form repeat records before this date
    :param domains: list of domains to check
    :param should_create: if  True, missing repeat records that are discovered will be registered with the repeater
    :return: a dictionary containing stats about the missing repeat records and metadata
:param startdate: search for missing form repeat records after this date
    :param enddate: search for missing form repeat records before this date
    :param domains: list of domains to check
    :param should_create: if  True, missing repeat records that are discovered will be registered with the repeater
    :return: a dictionary containing stats about the missing repeat records and metadata
: param startdate : search for missing form repeat records after this date : param enddate : search for missing form repeat records before this date : param domains : list of domains to check : param should_create : if True missing repeat records that are discovered will be registered with the repeater : return : a dictionary containing stats about the missing repeat records and metadata
def find_missing_form_repeat_records(startdate, enddate, domains, should_create=False):
    """
    :param startdate: search for missing form repeat records after this date
    :param enddate: search for missing form repeat records before this date
    :param domains: list of domains to check
    :param should_create: if  True, missing repeat records that are discovered will be registered with the repeater
    :return: a dictionary containing stats about the missing repeat records and metadata
    """
    missing_forms_per_domain = {}
    for index, domain in enumerate(domains):
        t0 = time.time()
        try:
            total_missing_count, total_count = find_missing_form_repeat_records_for_domain(
                domain, startdate, enddate, should_create
            )
            t1 = time.time()
            time_to_run = t1 - t0
            if total_missing_count > 0:
                pct_missing = f'{round((total_missing_count / total_count) * 100, 2)}%'
                rounded_time = f'{round(time_to_run, 0)} seconds'
                missing_forms_per_domain[domain] = {
                    FORMS: {
                        MISSING_REPEAT_RECORD_COUNT: total_missing_count,
                        PCT_MISSING: pct_missing,
                        TIME_TO_RUN: rounded_time,
                    }
                }

                logger.info(f'{domain} complete. Found {total_missing_count}" missing repeat records in '
                            f'{rounded_time}. This accounts for {pct_missing} of all repeat records in the '
                            f'specified date range.'
                            )

            if index + 1 % 10 == 0:
                logger.info(f"{(index + 1)}/{len(domains)} domains complete.")

        except Exception as e:
            logger.error(f"Encountered error with {domain}: {e}")

    return missing_forms_per_domain
def find_missing_form_repeat_records ( startdate , enddate , domains , should_create = False ) : missing_forms_per_domain = { } for index , domain in enumerate ( domains ) : t0 = time . time ( ) try : total_missing_count , total_count = find_missing_form_repeat_records_for_domain ( domain , startdate , enddate , should_create ) t1 = time . time ( ) time_to_run = t1 - t0 if total_missing_count > 0 : pct_missing = f'{round((total_missing_count / total_count) * 100, 2)}%' rounded_time = f'{round(time_to_run, 0)} seconds' missing_forms_per_domain [ domain ] = { FORMS : { MISSING_REPEAT_RECORD_COUNT : total_missing_count , PCT_MISSING : pct_missing , TIME_TO_RUN : rounded_time , } } logger . info ( f'{domain} complete. Found {total_missing_count}" missing repeat records in ' f'{rounded_time}. This accounts for {pct_missing} of all repeat records in the ' f'specified date range.' ) if index + 1 % 10 == 0 : logger . info ( f"{(index + 1)}/{len(domains)} domains complete." ) except Exception as e : logger . error ( f"Encountered error with {domain}: {e}" ) return missing_forms_per_domain