def METHOD_NAME(entity: str, aspect: str) -> None:
    from ruamel.yaml import YAML
    yaml = YAML()
    doc = yaml.load(ENTITY_REGISTRY_PATH)
    for entry in doc["entities"]:
        if entry["name"] == entity:
            entry["aspects"].append(aspect)
            break
    else:
        raise ValueError(
            f'could not find entity "{entity}" in entity registry at {ENTITY_REGISTRY_PATH}'
        )
    # Prevent line wrapping + preserve indentation.
    yaml.width = 2**20  # type: ignore[assignment]
    yaml.indent(mapping=2, sequence=4, offset=2)
    yaml.dump(doc, ENTITY_REGISTRY_PATH)