import uuid


def generate_uid(prefix: str):
    """Generates a (sufficiently) unique ID starting with the `prefix`.

    The ID is composed from the prefix, a hexadecimal string obtained from the current time and a random hexadecimal
    string. This makes the uid sufficiently unique.
    """
    time_uid = uuid.uuid1(node=0).hex[:-12]
    random_uid = uuid.uuid4().hex[:12]
    return f"{prefix}-{time_uid}-{random_uid}"