def METHOD_NAME(cls, values: dict[str, Any]) -> dict[str, Any]:
    in_tree = values["path"] is not None
    from_url = values["url"] is not None
    # cpython_modules is a special case, it is not in the tree
    # TODO: just copy the file into the tree?
    # if not (in_tree or from_url):
    #     raise ValueError("Source section should have a 'url' or 'path' key")
    if in_tree and from_url:
        raise ValueError(
            "Source section should not have both a 'url' and a 'path' key"
        )
    return values