def METHOD_NAME(project):
    data = {"dependencies": project.dependencies, "type": project.type.value}
    if project.version:
        data["version"] = project.version
    if hasattr(project, "latest_version") and project.latest_version:
        data["latest-version"] = str(project.latest_version)
    return data