Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ClassDef bases AttributeLoad AttributeLoad NameLoad attr attr body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str AugAssignAdd AttributeStore NameLoad attr Num Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return ListLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore IfExp UnaryOpNot Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr orelse Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad AttributeLoad NameLoad attr attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Dict Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Import alias Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body TryFinally body TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Raise finalbody Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body TryFinally body TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Str Dict Str Str Str Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Return NameLoad handlers ExceptHandler body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Raise Call AttributeLoad AttributeLoad NameLoad attr attr Str finalbody Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body TryFinally body TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Dict Str Str Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr handlers ExceptHandler body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Raise finalbody Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad Num NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr IfExp CompareIs NameLoad NameLoad ListLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore IfExp CompareIsNot AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call NameLoad ListLoad For NameStore ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr If CompareEq NameLoad NameLoad body Return CompareLt AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return CompareLt NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad AttributeLoad NameLoad attr body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr IfExp UnaryOpNot NameLoad Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str AugAssignAdd AttributeStore NameLoad attr Num Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body If CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr NameLoad TryExcept body Expr Call AttributeLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Return Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword ListLoad AttributeLoad NameLoad attr NameLoad NameLoad keyword BinOpMod Str Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body If CompareGt Call NameLoad AttributeLoad NameLoad attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Break If CompareLtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AugAssignSub AttributeStore NameLoad attr AttributeLoad NameLoad attr If CompareGtE AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Return decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore CompareIs AttributeLoad NameLoad attr NameLoad Assign NameStore IfExp NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad For NameStore AttributeLoad NameLoad attr body If CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr attr NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareGtE AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr AttributeLoad NameLoad attr Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr AttributeLoad NameLoad attr Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr While NameLoad body If BoolOpAnd AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr Num body Break TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Continue Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad TryExcept body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index NameLoad If UnaryOpNot Call NameLoad NameLoad body Break handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Call NameLoad NameLoad keyword NameLoad Break Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Return BinOpAdd Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr decorator_list NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str NameLoad Num Expr Call AttributeLoad NameLoad attr Num decorator_list Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Num TryExcept body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIs Call AttributeLoad NameLoad attr NameLoad body Import alias For NameStore ListLoad Num Num Num Num Num Num Num Num Num Num Num Num Num body Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Str Break orelse Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list
N/A N/A JIP ships with a **small and simple** local queueing system.
 N/A multiprocessing N/A os N/A subprocess N/A signal N/A sys N/A logging N/A jip.cluster jip.logger getLogger LocalCluster N/A N/A N/A jip cluster Cluster N/A __init__ N/A N/A self _start _remote_ids cores log_level N/A True False None N/A logging INFO N/A N/A N/A self _current_id 0 N/A N/A self log N/A getLogger jip.grids.LocalCluster N/A N/A self master_requests None N/A N/A self master_response None N/A N/A self master_process None N/A N/A self _current_id N/A N/A self _remote_ids _remote_ids N/A N/A self cores cores N/A N/A self loglevel log_level N/A N/A N/A N/A self log setLevel log_level N/A _start N/A N/A N/A N/A self start N/A _next_id N/A N/A self N/A N/A N/A Increment the current id and return the next available job
        id.

            >>> c = LocalCluster(_start=False)
            >>> assert c._current_id == 0
            >>> assert c._next_id() == 1
            >>> assert c._next_id() == 2

        :returns: next id
         N/A N/A self _current_id 1 N/A N/A self _current_id N/A start N/A N/A self N/A N/A N/A N/A N/A self master_process None N/A N/A N/A N/A N/A self log info Starting local cluster master N/A N/A self master_requests N/A N/A multiprocessing Queue N/A N/A self master_response N/A N/A multiprocessing Queue N/A N/A self master_process N/A N/A multiprocessing Process target N/A _GridMaster create_master args N/A N/A self master_requests N/A self master_response kwargs N/A cores loglevel N/A self cores N/A self loglevel name grid-master N/A N/A N/A N/A self master_process start N/A shutdown N/A N/A self N/A N/A N/A N/A N/A self master_process None N/A N/A N/A N/A N/A N/A self log info Requesting master shutdown N/A N/A N/A N/A self master_requests put N/A EXIT N/A N/A N/A N/A self master_process join N/A N/A N/A N/A self master_requests close N/A N/A N/A N/A self master_response close N/A N/A self master_process None N/A wait N/A N/A self N/A N/A N/A N/A N/A self master_process None N/A N/A N/A N/A N/A N/A self log info Waiting for termination of the master N/A N/A N/A N/A self master_requests put N/A WAIT N/A N/A N/A N/A self master_process join N/A N/A N/A N/A self master_requests close N/A N/A N/A N/A self master_response close N/A list N/A N/A self N/A N/A N/A N/A N/A self master_process None N/A N/A N/A N/A N/A N/A N/A self master_requests put N/A JOBS N/A N/A N/A N/A self master_response get N/A submit N/A N/A self job N/A N/A N/A N/A N/A self master_process None N/A N/A N/A N/A N/A jip cluster SubmissionError No Grid master found! N/A local_job N/A N/A N/A isinstance job _Job N/A N/A _Job from_job job job N/A N/A N/A self _remote_ids N/A N/A N/A local_job job_id N/A N/A self _next_id N/A N/A N/A N/A self master_requests put N/A SUBMIT local_job N/A N/A self _remote_ids N/A N/A N/A job job_id N/A N/A N/A self master_response get N/A N/A N/A job job_id N/A local_job job_id N/A N/A N/A N/A self log info Submitted new job with id %s N/A job job_id N/A job N/A resolve_log N/A N/A self job path N/A N/A N/A N/A path None N/A N/A None N/A N/A N/A path replace %J N/A str N/A job id N/A cancel N/A N/A self job N/A N/A N/A N/A N/A self master_process None N/A N/A N/A N/A N/A N/A self log info Send cancel request for %s N/A job job_id N/A N/A N/A N/A self master_requests put N/A CANCEL N/A job job_id N/A N/A JIP N/A N/A N/A jip cluster Cluster N/A __init__ N/A N/A self N/A N/A N/A N/A self log N/A getLogger jip.grids.JIP N/A cfg N/A N/A N/A jip config get jip_grid N/A N/A N/A self host N/A N/A cfg get host 127.0.0.1 N/A N/A self port N/A N/A cfg get port 5556 N/A N/A self log N/A getLogger jip.cluster.JIP N/A _connect N/A N/A self N/A N/A N/A zmq N/A context N/A N/A zmq Context N/A socket N/A N/A context socket N/A zmq REQ N/A N/A N/A socket setsockopt N/A zmq LINGER 0 N/A N/A socket RCVTIMEO 1000 N/A N/A N/A N/A self log info Connecting to remote grid: %s:%s N/A self host N/A self port N/A N/A N/A socket connect N/A tcp://%s:%s N/A N/A self host N/A self port N/A N/A context socket N/A list N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A context socket N/A N/A self _connect N/A N/A N/A socket send_json N/A cmd list N/A jobs N/A N/A socket recv_json N/A N/A N/A N/A N/A N/A N/A self log error Unable to connect to grid server! N/A N/A N/A N/A N/A socket close N/A N/A N/A context term N/A jobs N/A submit N/A N/A self job N/A N/A N/A N/A N/A N/A N/A N/A context socket N/A N/A self _connect N/A local N/A N/A _Job from_job job N/A N/A N/A socket send_json N/A cmd job submit N/A job_id id cmd stdout stderr working_directory dependencies children N/A local job_id N/A local id N/A local cmd N/A local stdout N/A local stderr N/A local working_directory N/A f N/A f N/A local dependencies N/A f N/A f N/A local children N/A submitted N/A N/A socket recv_json N/A N/A job job_id N/A submitted N/A job_id N/A N/A job working_directory N/A submitted N/A working_directory N/A N/A job stdout N/A submitted N/A stdout N/A N/A job stderr N/A submitted N/A stderr N/A job N/A N/A N/A N/A N/A N/A N/A self log error Unable to connect to grid server! exc_info True N/A N/A N/A N/A jip cluster SubmissionError Unable to connect to cluster N/A N/A N/A N/A socket close N/A N/A N/A context term N/A job N/A resolve_log N/A N/A self job path N/A N/A N/A N/A path None N/A N/A None N/A N/A N/A path replace %J N/A str N/A job id N/A cancel N/A N/A self job N/A N/A N/A N/A N/A N/A N/A N/A context socket N/A N/A self _connect N/A N/A N/A N/A self log info Send cancel request for %s N/A job job_id N/A N/A N/A socket send_json N/A cmd id cancel N/A job job_id N/A N/A N/A socket recv N/A N/A N/A N/A N/A N/A N/A self log error Unable to connect to grid server! N/A N/A N/A N/A N/A socket close N/A N/A N/A context term N/A N/A _Job N/A object N/A N/A Local Job object that is send to the local grid and contains
    all the information that is needed and supported by the local cluster
    implementation.

    This class is for internal purposes and there should be no need to
    interact with it outside of this module.

    This class is sortable and the order is defined by the number of activate
    dependencies and the job_id.
     __init__ N/A N/A self cmd cwd stdout stderr dependencies threads job_id N/A None None None None None 1 None N/A N/A N/A self id job_id N/A N/A self job_id job_id N/A N/A self dependencies N/A N/A dependencies None N/A dependencies N/A N/A self threads threads N/A N/A self cmd cmd N/A N/A self working_directory cwd N/A N/A self stdout stdout N/A N/A self stderr stderr N/A N/A self children N/A N/A N/A self process None N/A from_job N/A N/A cls job N/A N/A N/A cwd N/A N/A N/A job working_directory None N/A job working_directory N/A N/A os getcwd N/A N/A N/A job stderr None N/A N/A N/A job stderr N/A N/A N/A os path join cwd jip-%J.err N/A N/A N/A job stdout None N/A N/A N/A job stdout N/A N/A N/A os path join cwd jip-%J.out N/A deps N/A set N/A N/A dep N/A d N/A d N/A job dependencies N/A d job_id N/A N/A N/A N/A deps add N/A int N/A dep job_id N/A local_job N/A _Job N/A N/A job get_cluster_command cwd N/A job stdout N/A job stderr dependencies deps threads N/A job threads N/A N/A local_job id N/A job id N/A local_job N/A classmethod __lt__ N/A N/A self other N/A N/A N/A num_deps N/A len N/A self dependencies N/A o_deps N/A len N/A other dependencies N/A N/A num_deps o_deps N/A N/A N/A N/A self job_id N/A other job_id N/A N/A num_deps o_deps N/A __repr__ N/A N/A self N/A N/A N/A N/A {Job-%s[deps: %s][children: %s]} N/A N/A str N/A self job_id N/A self dependencies N/A self children N/A N/A _GridMaster N/A object N/A N/A The grid master instance __init__ N/A N/A self requests response cores loglevel N/A None N/A logging INFO N/A N/A Initialize a new grid master with the request and response
        queues and optionally the number of cores or slots available.
        If no cores are specified, the number of cores of the current
        machine are used
         N/A N/A self requests requests N/A N/A self response response N/A N/A self queued N/A N/A N/A self running N/A N/A N/A self slots_available N/A N/A cores N/A N/A multiprocessing cpu_count cores N/A N/A self slots_total N/A self slots_available N/A N/A self log N/A getLogger jip.grids.Master N/A N/A self wait_mode False N/A N/A self _current_id 0 N/A N/A N/A N/A self log setLevel loglevel N/A N/A N/A N/A self log info Master | Initialized with %d available slots N/A self slots_available N/A _next_id N/A N/A self N/A N/A N/A Increment the current id and return the next available job
        id.

            >>> c = _GridMaster(None, None)
            >>> assert c._current_id == 0
            >>> assert c._next_id() == 1
            >>> assert c._next_id() == 2

        :returns: next id
         N/A N/A self _current_id 1 N/A N/A self _current_id N/A _remove_children N/A N/A self job N/A N/A N/A Given a _Job instance, this recursively removes all child
        jobs from the list of queued jobs. This ONLY works on children
        that are NOT currently running.

        :param job: the parent job instance
         N/A N/A N/A N/A self log debug Master | Removing all children of %s from queued jobs N/A job job_id N/A c N/A job children N/A N/A N/A c N/A self queued N/A N/A child N/A N/A self queued N/A c N/A N/A N/A self _remove_children child N/A N/A N/A self _update_dependencies child N/A N/A N/A self queued N/A c N/A _update_dependencies N/A N/A self job N/A N/A N/A Given a _Job, this updates the dependency list of all
        children of the given job and removes the given job from the
        list of dependencies.

        The dependency list of a jobs is used to determine if the job can
        be executed. It can start if there are no dependencies left. This
        removes the given job from the dependencies and should be called
        after the given job finished successfully.

        :param job: the parent job that will be removed from its child
                    dependencies
         N/A c N/A job children N/A N/A N/A c N/A self queued N/A N/A N/A N/A N/A self log debug Master | Removing %s from child %s dependencies N/A job job_id c N/A N/A N/A N/A N/A N/A N/A N/A self queued N/A c dependencies remove N/A job job_id N/A N/A N/A KeyError N/A N/A N/A N/A N/A self log error Job with id %s no found in the child %s dependencies! N/A job job_id c N/A _run_job N/A N/A self job N/A N/A N/A Takes the given local job and starts it in a dedicated process
        with a new Executor instance to run the job.
        The jobs process is stored in the job instance and the job instances
        is moved from queued to running

        :param job: the job to send
         N/A N/A N/A N/A job job_id N/A self queued N/A N/A N/A N/A N/A self log error Job %s not in the set of queued jobs! N/A job job_id N/A N/A job_id N/A job job_id N/A N/A N/A N/A self log info Master | Starting job %s job_id N/A process N/A N/A multiprocessing Process target _execute_job args N/A N/A self requests job_id job name N/A worker-%s N/A str job_id N/A N/A job process process N/A N/A N/A self running N/A job_id job N/A N/A N/A self queued N/A job_id N/A N/A N/A process start N/A schedule N/A N/A self N/A N/A N/A N/A N/A N/A self log info Master | running scheduler %d/%d N/A self slots_available N/A self slots_total N/A sorted_jobs N/A sorted N/A N/A N/A self queued values N/A job sorted_jobs N/A N/A N/A N/A len N/A job dependencies 0 N/A N/A N/A N/A N/A self log info Master | No jobs without dependencies found N/A N/A N/A N/A job threads N/A self slots_available N/A N/A N/A N/A N/A self log info Master | Submitting job for execution %s N/A job job_id N/A N/A N/A self _run_job job N/A N/A self slots_available N/A job threads N/A N/A N/A self slots_available 1 N/A N/A N/A N/A self schedule N/A N/A _resolve_log N/A N/A self job_id path N/A N/A N/A N/A path None N/A N/A None N/A N/A N/A path replace %J N/A str job_id N/A _handle_exit N/A N/A self N/A args N/A N/A The EXIT handler N/A N/A N/A N/A self log info Master | EXIT request, shutting down N/A N/A job_id p N/A N/A N/A self running iteritems N/A N/A N/A N/A N/A self log warn Master | Terminating %s job_id N/A N/A N/A N/A p process terminate N/A N/A N/A N/A p process join N/A False N/A _handle_wait N/A N/A self N/A args N/A N/A The WAIT handler N/A N/A N/A self wait_mode N/A N/A N/A N/A N/A self log info Master | WAIT requested, entering wait mode! N/A N/A self wait_mode True N/A True N/A _handle_jobs N/A N/A self N/A args N/A N/A The JOBS handler N/A N/A N/A N/A self log info Master | list jobs N/A N/A N/A N/A self response put N/A N/A list N/A N/A N/A self queued keys N/A list N/A N/A N/A self running keys N/A True N/A _handle_submit N/A N/A self N/A args N/A N/A The SUBMIT handler N/A job N/A args N/A 1 N/A create_id N/A N/A job job_id None N/A job_id N/A create_id N/A N/A self _next_id N/A job job_id N/A N/A job job_id job_id N/A N/A job stdout N/A N/A self _resolve_log N/A job id N/A job stdout N/A N/A job stderr N/A N/A self _resolve_log N/A job id N/A job stderr N/A N/A N/A self queued N/A job_id job N/A d N/A job dependencies N/A N/A N/A d N/A self queued N/A N/A N/A N/A N/A N/A N/A self queued N/A d children append job_id N/A N/A d N/A self running N/A N/A N/A N/A N/A N/A N/A self running N/A d children append job_id N/A N/A N/A N/A self log info Master | Queue new job %s job_id N/A create_id N/A N/A N/A N/A N/A self response put job_id N/A N/A N/A self slots_available 1 N/A N/A N/A N/A self schedule N/A True N/A _handle_done N/A N/A self N/A args N/A N/A The DONE handler N/A job_id N/A int N/A args N/A 1 N/A state N/A args N/A 2 N/A N/A job_id N/A self running N/A N/A job N/A N/A self running N/A job_id N/A N/A N/A N/A job process join N/A N/A job process None N/A N/A self slots_available N/A job threads N/A N/A N/A self _update_dependencies job N/A N/A state 0 N/A N/A N/A N/A N/A self log error Master | Job %s failed with %s job_id state N/A N/A N/A self _remove_children job N/A N/A N/A N/A N/A self log info Master | Job %s finished with %s job_id state N/A N/A job process None N/A N/A N/A self running N/A job_id N/A N/A N/A self schedule N/A N/A N/A N/A N/A self log warn Master | Job %s marked as done, but was not found in running jobs! job_id N/A True N/A _handle_failed N/A N/A self N/A args N/A N/A The FAILED handler N/A job_id N/A int N/A args N/A 1 N/A error N/A args N/A 2 N/A N/A N/A N/A self log error Master | Execution of %s failed: %s job_id error N/A N/A job_id N/A self unning N/A N/A job N/A N/A self running N/A job_id N/A N/A job process None N/A N/A N/A self _update_dependencies job N/A N/A N/A self _remove_children job N/A N/A self slots_available N/A job threads N/A N/A N/A self running N/A job_id N/A N/A N/A self schedule N/A N/A N/A N/A N/A self log error N/A Master | Execution of %s marked as failed, but was not found in running jobs! job_id N/A True N/A _handle_cancel N/A N/A self N/A args N/A N/A The CANCEL handler N/A job_id N/A int N/A args N/A 1 N/A N/A N/A N/A self log warn Master | Execution of %s canceled job_id N/A job None N/A N/A job_id N/A self running N/A N/A N/A N/A N/A self log warn Master | Terminating %s job_id N/A job N/A N/A self running N/A job_id N/A N/A N/A N/A job process terminate N/A N/A N/A N/A job process join N/A N/A job process None N/A N/A self slots_available N/A job threads N/A N/A N/A self running N/A job_id N/A N/A N/A job_id N/A self queued N/A N/A job N/A N/A self queued N/A job_id N/A N/A N/A self queued N/A job_id N/A N/A N/A N/A N/A self log warn Master | Execution %s cancellation requested, but job could not be found! job_id N/A job N/A N/A N/A N/A self _update_dependencies job N/A N/A N/A self _remove_children job N/A N/A N/A self schedule N/A True N/A start N/A N/A self N/A N/A N/A Start the master loop and get messages from the requests queue.
        The command messages are lists where the first element is the
        actual command, followed by the command parameters.
         N/A handlers N/A EXIT JOBS SUBMIT WAIT DONE FAILED CANCEL N/A self _handle_exit N/A self _handle_jobs N/A self _handle_submit N/A self _handle_wait N/A self _handle_done N/A self _handle_failed N/A self _handle_cancel N/A True N/A N/A N/A N/A self wait_mode N/A N/A N/A self _num_jobs 0 N/A N/A N/A N/A N/A msg N/A N/A N/A self requests get N/A N/A N/A KeyboardInterrupt N/A err N/A N/A N/A N/A N/A self log warn Server process canceled N/A N/A N/A N/A N/A self log debug Master | received command: %s msg N/A N/A N/A command N/A msg N/A 0 N/A handler N/A handlers N/A command N/A N/A N/A handler msg N/A N/A N/A N/A N/A Exception N/A err N/A N/A N/A N/A N/A self log error Master | error while handling message %s : %s msg N/A str err exc_info True N/A N/A N/A N/A N/A self log info Master | Master loop terminated N/A _num_jobs N/A N/A self N/A N/A N/A N/A N/A len N/A self queued N/A len N/A self running N/A create_master N/A N/A request response cores loglevel N/A None N/A logging INFO N/A N/A master N/A _GridMaster request response cores cores loglevel loglevel N/A N/A N/A master start N/A staticmethod N/A _execute_job N/A N/A requests job_id job N/A N/A N/A Local grid executor method that takes a ``_Job`` instance and
    runs its command in a subprocess.

    :param request: the request queue to send completion state back to
                    the master
    :param job_id: the local job id
    :param job: instance of local job
     N/A log N/A getLogger jip.grids.Executor N/A process None handle_term N/A N/A sig frame N/A N/A N/A N/A N/A log error Exec | Received termination signal N/A N/A _terminate_process process log N/A N/A N/A requests put N/A DONE job_id 1 N/A N/A N/A sys exit 1 N/A N/A N/A N/A signal signal N/A signal SIGTERM handle_term N/A N/A N/A log info Exec | Start job %s job_id N/A result -1 N/A N/A N/A cwd N/A job working_directory N/A stdout N/A open N/A job stdout w N/A stderr N/A open N/A job stderr w N/A cmd N/A job cmd N/A process N/A N/A subprocess Popen N/A exec  cmd stdout stdout stderr stderr shell True cwd cwd N/A result N/A N/A process wait N/A N/A N/A Exception N/A err N/A N/A N/A N/A log error Exec | Error : %s err exc_info True N/A N/A N/A requests put N/A FAILED job_id N/A str err N/A N/A N/A log info Exec | Job finished %s with %d job_id result N/A N/A N/A requests put N/A DONE job_id result N/A _terminate_process N/A N/A process log N/A N/A N/A Helper function that terminates the given process N/A N/A process None N/A N/A N/A N/A log info Exec | Sending SIGTERM N/A N/A N/A process send_signal N/A signal SIGTERM N/A N/A N/A N/A process poll None N/A N/A time N/A t N/A 0.01 0.01 0.01 0.02 0.02 0.02 0.02 0.02 0.02 0.1 1 2 5 N/A N/A N/A N/A time sleep t N/A N/A N/A N/A process poll None N/A N/A N/A N/A log info Exec | Processes terminated after SIGTERM N/A N/A N/A N/A N/A log info Exec | Processes still running, sending SIGKILL N/A N/A N/A os kill N/A N/A process _popen pid N/A signal SIGKILL N/A