def parse_certificate(body):
    """
    Helper function that parses a PEM certificate.

    :param body:
    :return:
    """
    assert isinstance(body, str)

    return x509.load_pem_x509_certificate(body.encode("utf-8"), default_backend())

    Helper function that parses a PEM certificate.

    :param body:
    :return:
    
lemur/common/utils.py