def METHOD_NAME(self, username):
    """Return user object with the given username."""
    user_model = get_user_model()
    user = None
    try:
        user = user_model.objects.get(username=username)
    except user_model.DoesNotExist:
        self.errors.append(f"User {username} does not exist")
    return user