def METHOD_NAME(self, path):
    """Write the public key to the given file."""
    pem = self._get_public().public_bytes(
        encoding=serialization.Encoding.PEM,
        format=serialization.PublicFormat.SubjectPublicKeyInfo)
    with open(path, 'wb') as f:
        f.write(pem)