def load_certificate_file(path):
    """
    Load a certificate from a specified path.

    :param FilePath path: Absolute path to certificate file.

    :return: A ``Certificate`` instance representing the parsed
        certificate data.
    """
    try:
        certificate_file = path.open()
    except __HOLE__ as e:
        code, failure = e
        raise PathError(
            b"Certificate file could not be opened.",
            e.filename, code, failure
        )
    certificate = Certificate.load(
        certificate_file.read(), format=crypto.FILETYPE_PEM)
    return certificate
dataset/ETHPy150Open ClusterHQ/flocker/flocker/ca/_ca.py/load_certificate_file