<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def user_attr(username, attribute):
 """Gets an attribute of the user with the given username."""

    return getattr(User.objects.get(username=username), attribute)