def METHOD_NAME(project: "models.Project", user: "models.User") -> "models.PackageJob":
    """Returns an unfinished or freshly created package job.
    Checks if there is already an unfinished package job and returns it,
    or creates a new package job and returns it.
    """
    if not project.project_filename:
        raise exceptions.NoQGISProjectError()
    # Check if active package job already exists
    query = Q(project=project) & (
        Q(status=models.PackageJob.Status.PENDING)
        | Q(status=models.PackageJob.Status.QUEUED)
        | Q(status=models.PackageJob.Status.STARTED)
    )
    if models.PackageJob.objects.filter(query).count():
        return models.PackageJob.objects.get(query)
    package_job = models.PackageJob.objects.create(project=project, created_by=user)
    return package_job