def METHOD_NAME():
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "eventlog_file",
        type=argparse.FileType("rb"),
        default=sys.stdin,
        help="Binary UEFI eventlog (Normally /sys/kernel/security/tpm0/binary_bios_measurements)",
    )
    parser.add_argument(
        "--without-secureboot",
        "-i",
        action="store_true",
        help="Set if you want to create a mb_refstate without SecureBoot (only MeasuredBoot)",
    )
    parser.add_argument(
        "mb_refstate", type=argparse.FileType("w"), help="Output path for the generated measure boot reference state."
    )
    args = parser.parse_args()
    log_bin = args.eventlog_file.read()
    failure, log_data = parse_binary_bootlog(log_bin)
    if failure or not log_data:
        logging.error(
            f"Parsing of binary boot measurements failed with: {list(map(lambda x: x.context, failure.events))}"
        )
        sys.exit(1)
    events = log_data.get("events")
    if not events:
        logging.error("No events found on binary boot measurements log")
        sys.exit(1)
    has_secureboot = secureboot_enabled(events)
    if not has_secureboot and not args.without_secureboot:
        logging.error("Provided eventlog has SecureBoot disabled, but -i flag was not set")
        sys.exit(1)
    if has_secureboot and args.without_secureboot:
        logging.warning(
            "-i was set to create a refstate without SecureBoot, "
            "but he provided eventlog has SecureBoot enabled. Ignoring this flag!"
        )
    mb_refstate = {
        "has_secureboot": has_secureboot,
        "scrtm_and_bios": [
            {
                **get_s_crtm(events),
                **get_platform_firmware(events),
            }
        ],
        **get_keys(events),
        **get_mok(events),
        **get_kernel(events, has_secureboot),
    }
    json.dump(mb_refstate, args.mb_refstate)