def find_well_by_name_in_project(context, well_name):
    """
    Return the single well, named `well_name`, of the loaded project.
    Args:
        context: The test context (expected to contain the loaded project).
        well_name: The name of the well of interest.

    Returns:
        The single well named, `well_name`, in the loaded project.

    Raises:
        AssertionError if no such well exists or more than one well exists.
    """
    assert context.project is not None, f'Expected loaded project to be available in `context`. Found none.'
    candidates = list(context.project.wells().find_by_name(well_name))
    assert len(candidates) == 1, f'Found {len(candidates)} wells with name, {well_name}. Expected exactly 1.'

    return candidates[0]