def METHOD_NAME(self, project, version_slug):
    """Build a `ProjectData` object given a project and its version."""
    url = project.get_docs_url(version_slug=version_slug)
    project_alias = project.superprojects.values_list("alias", flat=True).first()
    version_data = VersionData(
        slug=version_slug,
        docs_url=url,
    )
    return ProjectData(
        alias=project_alias,
        version=version_data,
    )