human
Complete this python program:
def map_subproject_slug(view_func):
assistant
#Here is the Python program you requested.

    """A decorator that maps a ``subproject_slug`` URL param into a Project.
    :raises: Http404 if the Project doesn\t exist
    .. warning:: Does not take into account any kind of privacy settings.
    """
    @wraps(view_func)
    def inner_view(request, subproject=None, subproject_slug=None, *args, **kwargs):
        if ((subproject is None) and subproject_slug):
            try:
                subproject = Project.objects.get(slug=subproject_slug)
            except Project.DoesNotExist:
                try:
                    rel = ProjectRelationship.objects.get(parent=kwargs['project'], alias=subproject_slug)
                    subproject = rel.child
                except (ProjectRelationship.DoesNotExist, KeyError):
                    raise Http404
        return view_func(request, subproject=subproject, *args, **kwargs)
    return inner_view