def make_const_handler(data):
    """
    Create a handler for a data opcode that returns a constant.
    """
    data = bytes_as_hex(data)

    def constant_data_opcode_handler(script, pc, verify_minimal_data=False):
        return pc+1, data
    return constant_data_opcode_handler