def METHOD_NAME(args):
    if args.registerfile:
        candidate_registers_values = []
        with open(args.registerfile, "r") as register_file:
            old_register_values = json.load(register_file)
        for value in old_register_values.iterkeys():
            candidate_registers_values.append(int(value))
    else:
        candidate_registers_values = range(port_start_range, port_end_range)
    found_registers = registers_from_candidates(candidate_registers_values, args)
    logger.info(
        "Scanned {0} registers, found {1}.".format(
            len(candidate_registers_values), len(found_registers)
        )
    )
    # with open('kamstrup_dump_{0}.json'.format(calendar.timegm(datetime.utcnow().utctimetuple())), 'w') as json_file:
    #    json_file.write(json.dumps(found_registers, indent=4, default=json_default))
    logger.info("""*** Sample Conpot configuration from this scrape:""")
    logger.info(generate_conpot_config(found_registers))