import random


def capnp_id() -> str:
    """
    Generates a valid id for a capnp schema.

    Returns:
        str -- capnp id
    """
    # the bitwise is for validating the id check capnp/parser.c++
    return hex(random.randint(0, 2 ** 64) | 1 << 63)