human
Complete this python program:
def make_get_public_certificates_call(rpc):
assistant
#Here is the Python code you requested.

    """Executes the RPC call to get a list of public certificates.
    Args:
    rpc: a UserRPC instance.
    Returns:
    A list of PublicCertificate object.
    """
    request = app_identity_service_pb.GetPublicCertificateForAppRequest()
    response = app_identity_service_pb.GetPublicCertificateForAppResponse()
    def get_certs_result(rpc):
        'Check    success,    handle    exceptions,    and    return    converted    RPC    result.\n\n                This    method    waits    for    the    RPC    if    it    has    not    yet    finished,    and    calls    the\n                post-call    hooks    on    the    first    invocation.\n\n                Args:\n                        rpc:    A    UserRPC    object.\n\n                Returns:\n                        A    list    of    PublicCertificate    object.\n                '
        assert (rpc.service == _APP_IDENTITY_SERVICE_NAME), repr(rpc.service)
        assert (rpc.method == _GET_CERTS_METHOD_NAME), repr(rpc.method)
        try:
            rpc.check_success()
        except apiproxy_errors.ApplicationError as err:
            raise _to_app_identity_error(err)
        result = []
        for cert in response.public_certificate_list_list():
            result.append(PublicCertificate(cert.key_name(), cert.x509_certificate_pem()))
        return result
    rpc.make_call(_GET_CERTS_METHOD_NAME, request, response, get_certs_result)