<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_relationship_url(user, status):
 """ Generate a url for adding a relationship on a given user. ``user`` is a User object, and ``status`` is either a relationship_status object or a string denoting a RelationshipStatus Usage:: href="{{ user|add_relationship_url:"following" }}" """

    if isinstance(status, RelationshipStatus):
        status = status.from_slug
    return reverse('relationship_add', args=[user.username, status])