<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def deferToGreenlet(*args, **kwargs):
 """Call function using a greenlet and return the result as a Deferred"""

    from twisted.internet import reactor
    assert reactor.greenlet == getcurrent(), "must invoke this in the reactor greenlet"
    return deferToGreenletPool(reactor, reactor.getGreenletPool(), *args, **kwargs)