def error_checker(keys, file_path, log_path):
    buffer_key = None
    past_key = None
    total_key_count = len(keys)
    skip_key_count = 0
    with open(file_path, encoding='utf-8') as f:
        for line in tqdm(f.readlines()):
            sps = line.rstrip().split(maxsplit=1)
            if (len(sps) == 2):
                (key, value) = sps
                if (key in keys):
                    past_key = key
                else:
                    if (buffer_key != past_key):
                        keys.remove(past_key)
                        skip_key_count += 1
                    buffer_key = past_key
            else:
                pass
    logging.info(f'Skip ratio is {(skip_key_count / total_key_count)}')
    return keys
def error_checker(keys, file_path, log_path):
    buffer_key = None
    past_key = None
    total_key_count = len(keys)
    skip_key_count = 0
    with open(file_path, encoding='utf-8') as f:
        for line in tqdm(f.readlines()):
            sps = line.rstrip().split(maxsplit=1)
            if (len(sps) == 2):
                (key, value) = sps
                if (key in keys):
                    past_key = key
                else:
                    if (buffer_key != past_key):
                        keys.remove(past_key)
                        skip_key_count += 1
                    buffer_key = past_key
            else:
                pass
    logging.info(f'Skip ratio is {(skip_key_count / total_key_count)}')
    return keys