<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getContextFactory(path):
 """Get a context factory for the client from keys already stored at path. Raises IOError if the credentials didn't exist. """

    with path.child("client.pem").open() as pemFile:
        cert = PrivateCertificate.loadPEM(pemFile.read())

    certOptions = cert.options() # TODO: verify server cert (see #1)
    certOptions.method = SSL.SSLv23_METHOD
    ctxFactory = SecureCiphersContextFactory(certOptions)
    return ctxFactory