def METHOD_NAME(self):
    if self.KEY_FILE_PATH:
        with open(self.KEY_FILE_PATH, "rb") as key_file:
            data = key_file.read()
    elif self.KEY:
        data = self.KEY
    public_key = serialization.load_pem_public_key(
                data, backend=default_backend()
            )
    return public_key