<s> '''<STR_LIT>''' <EOL> from __future__ import absolute_import <EOL> from __future__ import print_function <EOL> import functools <EOL> from collections import namedtuple <EOL> _Imap2BoundWorker = namedtuple ( "<STR_LIT>" , [ "<STR_LIT>" , "<STR_LIT:args>" , "<STR_LIT>" ] ) <EOL> class Imap2WorkerWrapper ( object ) : <EOL> '''<STR_LIT>''' <EOL> def __init__ ( self , fcn ) : <EOL> self . fcn = fcn <EOL> def init_args ( self , * args , ** kwargs ) : <EOL> return _Imap2BoundWorker ( self . fcn , args , kwargs ) <EOL> worker = Imap2WorkerWrapper <EOL> def instancemethod_worker ( fcn ) : <EOL> return property ( lambda self : worker ( functools . partial ( fcn , self ) ) ) </s>
