code: def assert_strong_password(username, password, old_password=None):
      
  
      # test the length
      try:
          minlength = settings.MIN_PASSWORD_LENGTH
      except AttributeError:
          minlength = 12
      if len(password) < minlength:
          raise ValueError(
              "Password must be at least %s characters long" % minlength)
  
      if username is not None and username in password:
          raise ValueError("Password contains username")
  
      return _assert_password(password, old_password)
docs: Raises ValueError if the password isn't strong.
  
      Returns the password otherwise.