def METHOD_NAME(password: str) -> str:
    try:
        # 'passlib' will be used only if already installed.
        # This way we do not force all modules to install
        # it only for testing.
        import passlib.hash
        return passlib.hash.sha256_crypt.using(rounds=1000).hash(password)
    except ImportError:
        # if 'passlib' is not installed, we will use a library
        # from the python distribution for convenience
        import hashlib
        return hashlib.sha224(password.encode("ascii")).hexdigest()