<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, workbench):
 """Get a context factory. If the client already has a credentials at path, use them. Otherwise, generate them at path. Notifications are reported to the given workbench. """

    try:
        return succeed(getContextFactory(path))
    except IOError:
        d = prompt(workbench, u"E-mail entry", u"Enter e-mail:")
        d.addCallback(_makeCredentials, path, workbench)
        d.addCallback(lambda _result: getContextFactory(path))
        return d