def METHOD_NAME(candidate_registers_values, args):
    kamstrupRegisterCopier = KamstrupRegisterCopier(
        args.host, args.port, int(args.communication_address)
    )
    found_registers = {}
    not_found_counts = 0
    scanned = 0
    dumpfile = "kamstrup_dump_{0}.json".format(
        calendar.timegm(datetime.utcnow().utctimetuple())
    )
    for register_id in candidate_registers_values:
        result = kamstrupRegisterCopier.get_register(register_id)
        if len(result) > 12:
            units = result[5]
            length = result[6]
            unknown = result[7]
            register_value = 0
            for p in range(length):
                register_value += result[8 + p] << (8 * ((length - p) - 1))
            found_registers[register_id] = {
                "timestamp": datetime.utcnow(),
                "units": units,
                "value": register_value,
                "value_length": length,
                "unknown": unknown,
            }
            logger.info(
                "Found register value at {0}:{1}".format(
                    hex(register_id), register_value
                )
            )
            with open(dumpfile, "w") as json_file:
                json_file.write(
                    json.dumps(found_registers, indent=4, default=json_default)
                )
        else:
            not_found_counts += 1
            if not_found_counts % 10 == 0:
                logger.info(
                    "Hang on, still scanning, so far scanned {0} and found {1} registers".format(
                        scanned, len(found_registers)
                    )
                )
        scanned += 1
    return found_registers