def METHOD_NAME(self):
    """
    Check if username is unique.
    """
    if self.username_field.unique:
        return True
    return any(
        len(unique_constraint.fields) == 1
        and unique_constraint.fields[0] == self.username_field.name
        for unique_constraint in self.UserModel._meta.total_unique_constraints
    )