Module Assign NameStore ListLoad Str Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias alias ImportFrom alias FunctionDef arguments args defaults body Assign NameStore Num For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad NameLoad If CompareGt Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body AugAssignBitOr NameStore AttributeLoad NameLoad attr Return NameLoad decorator_list Assign NameStore Call NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr BinOpAdd ListLoad Dict Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For NameStore AttributeLoad NameLoad attr body TryExcept body Return SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Pass Raise Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index Num Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body Expr SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body TryExcept body Return SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list Assign NameStore NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Dict Str Num Assign NameStore Dict Str Str Num Num Assign NameStore Call NameLoad ListLoad NameLoad NameLoad Assert CompareEq SubscriptLoad NameLoad Index Str Num Assert CompareEq SubscriptLoad NameLoad Index Str Num Assert CompareIn Str NameLoad Assert CompareNotIn Str NameLoad ImportFrom alias Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str Num Assert CompareEq SubscriptLoad NameLoad Index Str Num Assert CompareEq SubscriptLoad NameLoad Index Str Num Assert CompareIs Call AttributeLoad NameLoad attr Str NameLoad Assert Call NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareGtE AttributeLoad NameLoad attr TupleLoad Num Num body AugAssignAdd NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad body If Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str If Call NameLoad NameLoad AttributeLoad NameLoad attr body Expr Yield AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad TupleLoad Str ListLoad Str Str TupleLoad Str ListLoad Str TupleLoad Str ListLoad Str Str TupleLoad Str ListLoad Str For TupleStore NameStore NameStore NameLoad body Assert CompareEq Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body ImportFrom alias FunctionDef arguments args NameParam defaults body Return Call NameLoad Call NameLoad NameLoad decorator_list Expr Call NameLoad NameLoad NameLoad Str Expr Call NameLoad NameLoad NameLoad Str Expr Call NameLoad NameLoad NameLoad Str If CompareGtE AttributeLoad NameLoad attr TupleLoad Num Num body Expr Call NameLoad NameLoad NameLoad Str Expr Call NameLoad NameLoad NameLoad Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Num body Assert UnaryOpNot BinOpBitAnd NameLoad UnaryOpInvert NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr ListLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str Dict body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad Str AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad Dict Call NameLoad BinOpAdd ListLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num Num body Expr Str If Call NameLoad NameLoad NameLoad body Return NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpAdd NameLoad NameLoad orelse Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr TryFinally body For NameStore Call NameLoad BinOpAdd NameLoad Num body If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore AttributeLoad NameLoad attr Return Call NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpBitAnd AttributeLoad AttributeLoad NameLoad attr attr NameLoad finalbody Delete NameDel decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad GeneratorExp TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Return Call NameLoad ListLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return ListComp Call NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return UnaryOpNot CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr decorator_list Assign NameStore NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Num Return Call NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Num Return Call NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Num Return ListLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Num keyword Num Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Num Num decorator_list FunctionDef arguments args defaults body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore Call NameLoad Assert CompareIn Str AttributeLoad NameLoad attr Assert CompareIn Str AttributeLoad NameLoad attr Assert CompareIn Str AttributeLoad NameLoad attr Assert CompareIn Str AttributeLoad NameLoad attr Assert CompareIn Str AttributeLoad NameLoad attr Assert CompareIn Str AttributeLoad NameLoad attr Assert CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str Num Assert CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str Num Assert CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str Num Assert CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str Num Assert CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str Num Assert CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str Num Assert CompareIs SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Assert CompareIs SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad ImportFrom alias Expr Call NameLoad NameLoad AttributeLoad NameLoad attr BinOpPow Num Num Assert CompareIs Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Num Expr Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body If CompareGtE AttributeLoad NameLoad attr TupleLoad Num body Assign NameStore Str orelse Assign NameStore Str Assign NameStore AttributeLoad Call NameLoad NameLoad NameLoad attr Assert BinOpBitAnd NameLoad NameLoad Assign NameStore Str Assign NameStore Call NameLoad NameLoad Str Str Num Num Assign NameStore Dict Str Str Str NameLoad Lambda arguments args defaults Call AttributeLoad NameLoad attr Num Lambda arguments args defaults Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Str attr Index Str Str Assert CompareEq SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Str attr Index Str Str Assert CompareNotIn Str AttributeLoad SubscriptLoad NameLoad Index Str attr Assert CompareEq BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad Num Assert CompareEq BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad Num Assert CompareEq BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad Num Assign NameStore Call NameLoad BinOpAdd BinOpMod Str TupleLoad NameLoad NameLoad Str Str Num Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Str attr Index Str Str Assert CompareEq SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Str attr Index Str Str Assert CompareNotIn Str AttributeLoad SubscriptLoad NameLoad Index Str attr Assert CompareEq BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad NameLoad Assert CompareEq BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad Num Assert CompareEq BinOpBitAnd AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad ListLoad Dict Str Num Assert CompareEq Call AttributeLoad NameLoad attr Str Num Assert CompareEq Call AttributeLoad NameLoad attr Str keyword Dict Str Num Num ImportFrom alias Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Str Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Num Assert CompareEq Call AttributeLoad NameLoad attr Str Num Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Num Assert CompareEq Call AttributeLoad NameLoad attr Str Num decorator_list FunctionDef arguments args defaults body ImportFrom alias If CompareGtE AttributeLoad NameLoad attr TupleLoad Num body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assert BinOpBitAnd NameLoad NameLoad Assign NameStore Call NameLoad ListLoad Dict Str Num keyword Num Assert CompareEq Call AttributeLoad NameLoad attr Str NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Str Assert CompareEq AttributeLoad Call AttributeLoad NameLoad attr ListLoad Str attr Num Assert CompareEq AttributeLoad Call AttributeLoad NameLoad attr Dict Str Num attr Num Assign NameStore Call NameLoad ListLoad Dict Str Num keyword NameLoad Assert CompareEq Call AttributeLoad NameLoad attr Str NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Str Assert CompareEq AttributeLoad Call AttributeLoad NameLoad attr ListLoad Str attr NameLoad Assert CompareEq AttributeLoad Call AttributeLoad NameLoad attr Dict Str Num attr NameLoad orelse Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assert BinOpBitAnd NameLoad NameLoad Assign NameStore Call NameLoad ListLoad Dict Str Num keyword Num Assert CompareEqEq Call AttributeLoad NameLoad attr Str BinOpFloorDiv Num Num Num Assert CompareEq AttributeLoad Call AttributeLoad NameLoad attr ListLoad Str attr Num Assert CompareEq AttributeLoad Call AttributeLoad NameLoad attr Dict Str Num attr Num Assign NameStore Call NameLoad ListLoad Dict Str Num keyword NameLoad Assert CompareEqNotEq Call AttributeLoad NameLoad attr Str BinOpDiv BinOpMult Num Num Num Num Expr CompareEq AttributeLoad Call AttributeLoad NameLoad attr ListLoad Str attr NameLoad Assert CompareEq AttributeLoad Call AttributeLoad NameLoad attr Dict Str Num attr NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad ListLoad Dict Str Num Dict Str Num Dict Str Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str Assert CompareEq Call AttributeLoad NameLoad attr Str Num ImportFrom alias Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str Str Assert CompareEq Call AttributeLoad NameLoad attr Str Num Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num Assert CompareEq NameLoad NameLoad Assert CompareEq Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Lambda arguments args defaults Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assert CompareNotEq NameLoad NameLoad decorator_list Assign NameStore Dict Expr Call AttributeLoad NameLoad attr Str Dict NameLoad Import alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return UnaryOpNot CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign SubscriptStore NameLoad Index Str Dict Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListComp NameLoad comprehension NameStore Call NameLoad AttributeLoad NameLoad attr CompareIn NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore ListLoad Num FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If Call NameLoad NameLoad Str body Assign NameStore BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Num NameLoad AugAssignAdd SubscriptStore NameLoad Index Num Num Assign NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad NameLoad Return BinOpAdd NameLoad Str orelse Return NameLoad decorator_list Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad If Call NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Dict For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore Call NameLoad NameLoad NameLoad Assert CompareEq Call NameLoad NameLoad Num Assign NameStore SubscriptLoad NameLoad Index Num Assign TupleStore NameStore NameStore NameLoad Assert CompareEq NameLoad BinOpAdd NameLoad Str Assert Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Assign NameStore BinOpAdd BinOpAdd NameLoad Str SubscriptLoad NameLoad Slice Call NameLoad NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str While NameLoad body Assign NameStore Call NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assert NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad ListLoad NameLoad SubscriptLoad NameLoad Index Str Return Call NameLoad Str NameLoad AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body For NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body For NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad body Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str NameLoad NameLoad decorator_list Assign NameStore NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Str Assert CompareEq AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str keyword Str Assert CompareEq NameLoad NameLoad Assert CompareEq Call NameLoad NameLoad Call NameLoad NameLoad Assert CompareIs AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body ImportFrom alias Assign NameStore Call NameLoad Lambda arguments args defaults Str Assign NameStore Call NameLoad Lambda arguments args defaults Str Assign NameStore Call NameLoad Lambda arguments args defaults Str Assign NameStore Call NameLoad Str Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Print NameLoad Print NameLoad Assert CompareEq NameLoad Num For NameStore ListLoad Str Str Str body Assert CompareIs SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Str attr Index NameLoad SubscriptLoad Call NameLoad Index NameLoad For NameStore ListLoad Str Str Str Str Str Str body Assert CompareNotIn NameLoad AttributeLoad SubscriptLoad NameLoad Index Str attr Assert CompareEq SubscriptLoad NameLoad Index Str Dict Str Str Str Str Str Str Str Str Assert CompareEq SubscriptLoad NameLoad Index Str Str Assert CompareEq SubscriptLoad NameLoad Index Str Dict Str Str Str Str Str Str Str Str Assert CompareEq SubscriptLoad NameLoad Index Str ListLoad Call NameLoad ListLoad Str Str Str Call NameLoad ListLoad Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body AugAssignAdd AttributeStore NameLoad attr Num Import alias identifier AugAssignAdd AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body AugAssignAdd AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpSub NameLoad AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args defaults body ImportFrom alias Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Str Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Print NameLoad Print NameLoad Assert CompareEq NameLoad Num Assert CompareIs SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Str attr Index Str NameLoad For NameStore ListLoad Str Str Str Str body Assert CompareNotIn NameLoad AttributeLoad SubscriptLoad NameLoad Index Str attr Import alias identifier Expr Call AttributeLoad NameLoad attr NameLoad Num Dict Str Str Call AttributeLoad NameLoad attr ListLoad Num Num Call AttributeLoad NameLoad attr ListLoad Num Num Assert CompareEq AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr Num Assert CompareEq AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Dict Str Str Call AttributeLoad NameLoad attr ListLoad Num Num Call AttributeLoad NameLoad attr ListLoad Num Num Assert CompareEq AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr Num Assert CompareEq AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr Num Assert CompareEq AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr Num Assert CompareEq AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Assert CompareEq AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr Num Assert CompareEq AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr Num Assert CompareEq AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr Num Assert CompareEq AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr Num Expr Call AttributeLoad NameLoad attr NameLoad Num Dict Str Str Call AttributeLoad NameLoad attr ListLoad Num Num Call AttributeLoad NameLoad attr ListLoad Num Num Expr Call AttributeLoad NameLoad attr NameLoad Num Dict Str Str Call AttributeLoad NameLoad attr ListLoad Num Num Call AttributeLoad NameLoad attr ListLoad Num Num Expr Call AttributeLoad NameLoad attr NameLoad Num For NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str body Assert CompareEq AttributeLoad NameLoad attr Num Assert CompareEq AttributeLoad NameLoad attr Num Assert Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad Dict Str Str Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Call AttributeLoad NameLoad attr ListLoad Num Num Num Num ListLoad Num Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad For TupleStore NameStore NameStore NameStore NameLoad body Assign NameStore Dict Assign SubscriptStore NameLoad Index Str BoolOpAnd UnaryOpNot NameLoad CompareEq NameLoad AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str BoolOpAnd SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr CompareEq SubscriptLoad Call AttributeLoad NameLoad attr Index Num Str Expr Yield TupleLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore CompareEq NameLoad Str decorator_list FunctionDef arguments args defaults body Assign NameStore ListComp TupleLoad NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameStore NameStore Call NameLoad Str Assert CompareEq NameLoad ListLoad TupleLoad AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad Assert CompareEq Call NameLoad Call NameLoad Call NameLoad Str Num decorator_list FunctionDef arguments args NameParam NameParam defaults body For TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad body If BoolOpAnd SubscriptLoad NameLoad Index Str CompareIn NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad For TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad body If BoolOpAnd SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Dict Str Str Str Str attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad Print BinOpMod Str TupleLoad NameLoad NameLoad Print BinOpMod Str TupleLoad NameLoad Assert CompareEq NameLoad NameLoad decorator_list Expr Call NameLoad Str Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr ListLoad NameLoad Assign AttributeStore NameLoad attr ListLoad TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad If CompareIn NameLoad ListLoad Str Str Str body AugAssignAdd AttributeStore NameLoad attr Num If CompareIn NameLoad ListLoad Str Str Str body AugAssignSub AttributeStore NameLoad attr Num Assert CompareGtE AttributeLoad NameLoad attr Num If UnaryOpNot AttributeLoad NameLoad attr body If CompareEq NameLoad Str body Assign AttributeStore NameLoad attr NameLoad orelse Assert BoolOpOr CompareEq NameLoad AttributeLoad NameLoad attr CompareEq NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad For TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpAnd SubscriptLoad NameLoad Index Str CompareEq NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Return ListComp TupleLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr comprehension NameStore NameLoad decorator_list FunctionDef arguments args defaults body Assert CompareEq Call NameLoad Str Str ListLoad TupleLoad Str Str Assert CompareEq Call NameLoad Str Str ListLoad TupleLoad Str Str Assert CompareEq Call NameLoad Str Str ListLoad TupleLoad Str Str TupleLoad Str Str Assert CompareEq Call NameLoad Str Str ListLoad TupleLoad Str Str decorator_list
N/A N/A __all__ N/A EvalEnvironment EvalFactor N/A sys N/A __future__ N/A inspect N/A tokenize N/A ast N/A numbers N/A six patsy PatsyError patsy.util PushbackAdapter no_pickling assert_no_pickling patsy.tokens pretty_untokenize normalize_token_spacing python_tokenize patsy.compat call_and_wrap_exc _all_future_flags N/A N/A N/A N/A N/A flags 0 N/A feature_name N/A __future__ all_feature_names N/A N/A feature N/A getattr __future__ feature_name N/A N/A N/A N/A feature getMandatoryRelease N/A sys version_info N/A N/A flags N/A feature compiler_flag N/A flags N/A N/A _ALL_FUTURE_FLAGS N/A _all_future_flags VarLookupDict N/A object N/A __init__ N/A N/A self dicts N/A N/A N/A N/A self _dicts N/A N/A N/A N/A list dicts N/A __getitem__ N/A N/A self key N/A N/A N/A d N/A self _dicts N/A N/A N/A N/A N/A d N/A key N/A N/A N/A KeyError N/A N/A N/A N/A KeyError key N/A __setitem__ N/A N/A self key value N/A N/A N/A N/A N/A N/A self _dicts N/A 0 N/A key value N/A __contains__ N/A N/A self key N/A N/A N/A N/A N/A N/A self N/A key N/A N/A N/A KeyError N/A N/A False N/A N/A True N/A get N/A N/A self key default N/A None N/A N/A N/A N/A N/A self N/A key N/A N/A N/A KeyError N/A N/A default N/A __repr__ N/A N/A self N/A N/A N/A N/A %s(%r) N/A N/A N/A self __class__ __name__ N/A self _dicts N/A N/A __getstate__ no_pickling N/A test_VarLookupDict N/A N/A N/A N/A N/A d1 N/A a 1 N/A d2 N/A a b 2 3 N/A ds N/A VarLookupDict N/A d1 d2 N/A N/A N/A ds N/A a 1 N/A N/A N/A ds N/A b 3 N/A N/A a ds N/A N/A c ds nose.tools assert_raises N/A N/A assert_raises KeyError N/A ds __getitem__ c N/A N/A ds N/A a 10 N/A N/A N/A ds N/A a 10 N/A N/A N/A d1 N/A a 1 N/A N/A N/A N/A ds get c None N/A N/A isinstance N/A repr ds N/A six string_types N/A N/A assert_no_pickling ds N/A ast_names N/A N/A code N/A N/A N/A Iterator that yields all the (ast) names in a Python expression.

    :arg code: A string containing a Python expression.
     N/A disallowed_ast_nodes N/A N/A ast Lambda N/A ast ListComp N/A ast GeneratorExp N/A N/A N/A sys version_info N/A 2 7 N/A N/A disallowed_ast_nodes N/A N/A ast DictComp N/A ast SetComp N/A node N/A N/A ast walk N/A N/A ast parse code N/A N/A N/A isinstance node disallowed_ast_nodes N/A N/A N/A PatsyError Lambda, list/dict/set comprehension, generator expression in patsy formula not currently supported. N/A N/A isinstance node N/A ast Name N/A N/A N/A N/A node id N/A test_ast_names N/A N/A N/A N/A N/A test_data N/A N/A np.log(x) N/A np x N/A x N/A x N/A center(x + 1) N/A center x N/A dt.date.dt.month N/A dt N/A N/A code expected test_data N/A N/A N/A N/A set N/A ast_names code N/A set expected N/A test_ast_names_disallowed_nodes N/A N/A N/A N/A nose.tools assert_raises list_ast_names N/A N/A code N/A N/A N/A N/A list N/A ast_names code N/A N/A N/A assert_raises PatsyError list_ast_names lambda x: x + y N/A N/A assert_raises PatsyError list_ast_names [x + 1 for x in range(10)] N/A N/A assert_raises PatsyError list_ast_names (x + 1 for x in range(10)) N/A N/A N/A sys version_info N/A 2 7 N/A N/A N/A assert_raises PatsyError list_ast_names {x: True for x in range(10)} N/A N/A assert_raises PatsyError list_ast_names {x + 1 for x in range(10)} N/A EvalEnvironment N/A object N/A N/A Represents a Python execution environment.

    Encapsulates a namespace for variable lookup and set of __future__
    flags. __init__ N/A N/A self namespaces flags N/A 0 N/A N/A N/A N/A flags N/A _ALL_FUTURE_FLAGS N/A N/A self _namespaces N/A list namespaces N/A N/A self flags flags N/A namespace N/A N/A self N/A N/A N/A A dict-like object that can be used to look up variables accessible
        from the encapsulated environment. N/A N/A VarLookupDict N/A self _namespaces N/A property with_outer_namespace N/A N/A self outer_namespace N/A N/A N/A Return a new EvalEnvironment with an extra namespace added.

        This namespace will be used only for variables that are not found in
        any existing namespace, i.e., it is "outside" them all. N/A N/A N/A self __class__ N/A N/A self _namespaces N/A outer_namespace N/A self flags N/A eval N/A N/A self expr source_name inner_namespace N/A <string> N/A N/A N/A Evaluate some Python code in the encapsulated environment.

        :arg expr: A string containing a Python expression.
        :arg source_name: A name for this string, for use in tracebacks.
        :arg inner_namespace: A dict-like object that will be checked first
          when `expr` attempts to access any variables.
        :returns: The value of `expr`.
         N/A code N/A compile expr source_name eval N/A self flags False N/A N/A eval code N/A N/A VarLookupDict N/A N/A inner_namespace N/A self _namespaces N/A capture N/A N/A cls eval_env reference N/A 0 0 N/A N/A Capture an execution environment from the stack.

        If `eval_env` is already an :class:`EvalEnvironment`, it is returned
        unchanged. Otherwise, we walk up the stack by ``eval_env + reference``
        steps and capture that function's evaluation environment.

        For ``eval_env=0`` and ``reference=0``, the default, this captures the
        stack frame of the function that calls :meth:`capture`. If ``eval_env
        + reference`` is 1, then we capture that function's caller, etc.

        This somewhat complicated calling convention is designed to be
        convenient for functions which want to capture their caller's
        environment by default, but also allow explicit environments to be
        specified. See the second example.

        Example::

          x = 1
          this_env = EvalEnvironment.capture()
          assert this_env.namespace["x"] == 1
          def child_func():
              return EvalEnvironment.capture(1)
          this_env_from_child = child_func()
          assert this_env_from_child.namespace["x"] == 1

        Example::

          # This function can be used like:
          #   my_model(formula_like, data)
          #     -> evaluates formula_like in caller's environment
          #   my_model(formula_like, data, eval_env=1)
          #     -> evaluates formula_like in caller's caller's environment
          #   my_model(formula_like, data, eval_env=my_env)
          #     -> evaluates formula_like in environment 'my_env'
          def my_model(formula_like, data, eval_env=0):
              eval_env = EvalEnvironment.capture(eval_env, reference=1)
              return model_setup_helper(formula_like, data, eval_env)

        This is how :func:`dmatrix` works.

        .. versionadded: 0.2.0
           The ``reference`` argument.
         N/A N/A isinstance eval_env cls N/A N/A eval_env N/A N/A N/A isinstance eval_env N/A numbers Integral N/A N/A depth N/A eval_env reference N/A N/A N/A TypeError Parameter 'eval_env' must be either an integer or an instance of patsy.EvalEnvironment. N/A frame N/A N/A inspect currentframe N/A N/A N/A i N/A range N/A depth 1 N/A N/A N/A frame None N/A N/A N/A ValueError call-stack is not that deep! N/A frame N/A frame f_back N/A N/A cls N/A N/A frame f_locals N/A frame f_globals N/A N/A N/A frame f_code co_flags _ALL_FUTURE_FLAGS N/A N/A frame N/A classmethod subset N/A N/A self names N/A N/A N/A Creates a new, flat EvalEnvironment that contains only
        the variables specified. N/A vld N/A VarLookupDict N/A self _namespaces N/A new_ns N/A dict N/A N/A name N/A vld N/A name N/A name names N/A N/A EvalEnvironment N/A new_ns N/A self flags N/A _namespace_ids N/A N/A self N/A N/A N/A N/A N/A id n N/A n N/A self _namespaces N/A __eq__ N/A N/A self other N/A N/A N/A N/A N/A isinstance other EvalEnvironment N/A N/A self flags N/A other flags N/A N/A N/A self _namespace_ids N/A N/A other _namespace_ids N/A __ne__ N/A N/A self other N/A N/A N/A N/A N/A self other N/A __hash__ N/A N/A self N/A N/A N/A N/A hash N/A EvalEnvironment N/A self flags N/A tuple N/A N/A self _namespace_ids N/A N/A __getstate__ no_pickling N/A _a N/A N/A N/A N/A N/A _a 1 N/A N/A _b N/A _b N/A N/A N/A N/A N/A _b 1 N/A N/A _c N/A _c N/A N/A N/A N/A N/A _c 1 N/A N/A N/A N/A EvalEnvironment capture N/A N/A EvalEnvironment capture 0 N/A N/A EvalEnvironment capture 1 N/A N/A EvalEnvironment capture 0 reference 1 N/A N/A EvalEnvironment capture 2 N/A N/A EvalEnvironment capture 0 2 N/A test_EvalEnvironment_capture_namespace N/A N/A N/A N/A N/A N/A c0 c b1 b2 a1 a2 N/A _a N/A N/A test_EvalEnvironment_capture_namespace N/A c0 namespace N/A N/A test_EvalEnvironment_capture_namespace N/A c namespace N/A N/A test_EvalEnvironment_capture_namespace N/A b1 namespace N/A N/A test_EvalEnvironment_capture_namespace N/A b2 namespace N/A N/A test_EvalEnvironment_capture_namespace N/A a1 namespace N/A N/A test_EvalEnvironment_capture_namespace N/A a2 namespace N/A N/A N/A N/A c0 namespace N/A _c 1 N/A N/A N/A N/A c namespace N/A _c 1 N/A N/A N/A N/A b1 namespace N/A _b 1 N/A N/A N/A N/A b2 namespace N/A _b 1 N/A N/A N/A N/A a1 namespace N/A _a 1 N/A N/A N/A N/A a2 namespace N/A _a 1 N/A N/A N/A N/A b1 namespace N/A _c _c N/A N/A N/A N/A b2 namespace N/A _c _c nose.tools assert_raises N/A N/A assert_raises ValueError N/A EvalEnvironment capture N/A 10 6 N/A N/A N/A N/A EvalEnvironment capture b1 b1 N/A N/A assert_raises TypeError N/A EvalEnvironment capture 1.2 N/A N/A assert_no_pickling N/A N/A EvalEnvironment capture N/A test_EvalEnvironment_capture_flags N/A N/A N/A N/A N/A N/A N/A sys version_info N/A 3 N/A N/A TEST_FEATURE barry_as_FLUFL N/A N/A TEST_FEATURE division N/A test_flag N/A N/A getattr __future__ TEST_FEATURE compiler_flag N/A N/A test_flag _ALL_FUTURE_FLAGS N/A source def f():
    in_f = 'hi from f'
    global RETURN_INNER, RETURN_OUTER, RETURN_INNER_FROM_OUTER
    RETURN_INNER = EvalEnvironment.capture(0)
    RETURN_OUTER = call_capture_0()
    RETURN_INNER_FROM_OUTER = call_capture_1()
f()
 N/A code N/A compile source <test string> exec 0 1 N/A env N/A EvalEnvironment call_capture_0 call_capture_1 EvalEnvironment N/A N/A N/A N/A N/A N/A EvalEnvironment capture 0 N/A N/A N/A N/A N/A N/A EvalEnvironment capture 1 N/A env2 N/A dict env N/A N/A N/A six exec_ code env N/A N/A N/A N/A N/A env N/A RETURN_INNER namespace N/A in_f hi from f N/A N/A N/A N/A N/A env N/A RETURN_INNER_FROM_OUTER namespace N/A in_f hi from f N/A N/A in_f N/A N/A env N/A RETURN_OUTER namespace N/A N/A N/A N/A N/A env N/A RETURN_INNER flags _ALL_FUTURE_FLAGS 0 N/A N/A N/A N/A N/A env N/A RETURN_OUTER flags _ALL_FUTURE_FLAGS 0 N/A N/A N/A N/A N/A env N/A RETURN_INNER_FROM_OUTER flags _ALL_FUTURE_FLAGS 0 N/A code2 N/A compile N/A N/A from __future__ import %s
 N/A TEST_FEATURE source <test string 2> exec 0 1 N/A N/A N/A six exec_ code2 env2 N/A N/A N/A N/A N/A env2 N/A RETURN_INNER namespace N/A in_f hi from f N/A N/A N/A N/A N/A env2 N/A RETURN_INNER_FROM_OUTER namespace N/A in_f hi from f N/A N/A in_f N/A N/A env2 N/A RETURN_OUTER namespace N/A N/A N/A N/A N/A env2 N/A RETURN_INNER flags _ALL_FUTURE_FLAGS test_flag N/A N/A N/A N/A N/A env2 N/A RETURN_OUTER flags _ALL_FUTURE_FLAGS 0 N/A N/A N/A N/A N/A env2 N/A RETURN_INNER_FROM_OUTER flags _ALL_FUTURE_FLAGS test_flag N/A test_EvalEnvironment_eval_namespace N/A N/A N/A N/A N/A env N/A EvalEnvironment N/A N/A a 1 N/A N/A N/A N/A env eval 2 * a 2 N/A N/A N/A N/A env eval 2 * a inner_namespace N/A a 2 4 nose.tools assert_raises N/A N/A assert_raises NameError N/A env eval 2 * b N/A a 3 N/A env2 N/A N/A EvalEnvironment capture 0 N/A N/A N/A N/A env2 eval 2 * a 6 N/A env3 N/A N/A env with_outer_namespace N/A a b 10 3 N/A N/A N/A N/A env3 eval 2 * a 2 N/A N/A N/A N/A env3 eval 2 * b 6 N/A test_EvalEnvironment_eval_flags N/A N/A N/A N/A nose.tools assert_raises N/A N/A N/A sys version_info N/A 3 N/A N/A test_flag N/A N/A __future__ barry_as_FLUFL compiler_flag N/A N/A test_flag _ALL_FUTURE_FLAGS N/A env N/A EvalEnvironment N/A N/A a 11 flags 0 N/A N/A N/A N/A env eval a != 0 True N/A N/A assert_raises SyntaxError N/A env eval a <> 0 N/A N/A N/A N/A N/A env subset N/A a flags 0 N/A N/A N/A N/A N/A env with_outer_namespace N/A b 10 flags 0 N/A env2 N/A EvalEnvironment N/A N/A a 11 flags test_flag N/A N/A N/A N/A env2 eval a <> 0 True N/A N/A assert_raises SyntaxError N/A env2 eval a != 0 N/A N/A N/A N/A N/A env2 subset N/A a flags test_flag N/A N/A N/A N/A N/A env2 with_outer_namespace N/A b 10 flags test_flag N/A N/A test_flag N/A N/A __future__ division compiler_flag N/A N/A test_flag _ALL_FUTURE_FLAGS N/A env N/A EvalEnvironment N/A N/A a 11 flags 0 N/A N/A N/A N/A env eval a / 2 N/A 11 2 5 N/A N/A N/A N/A N/A env subset N/A a flags 0 N/A N/A N/A N/A N/A env with_outer_namespace N/A b 10 flags 0 N/A env2 N/A EvalEnvironment N/A N/A a 11 flags test_flag N/A N/A N/A N/A env2 eval a / 2 N/A N/A 11 1.0 2 5 N/A N/A N/A N/A N/A env2 subset N/A a flags test_flag N/A N/A N/A N/A N/A env2 with_outer_namespace N/A b 10 flags test_flag N/A test_EvalEnvironment_subset N/A N/A N/A N/A N/A env N/A EvalEnvironment N/A N/A a 1 N/A b 2 N/A c 3 N/A subset_a N/A N/A env subset N/A a N/A N/A N/A N/A subset_a eval a 1 nose.tools assert_raises N/A N/A assert_raises NameError N/A subset_a eval b N/A N/A assert_raises NameError N/A subset_a eval c N/A subset_bc N/A N/A env subset N/A b c N/A N/A N/A N/A subset_bc eval b * c 6 N/A N/A assert_raises NameError N/A subset_bc eval a N/A test_EvalEnvironment_eq N/A N/A N/A N/A N/A env1 N/A N/A EvalEnvironment capture 0 N/A env2 N/A N/A EvalEnvironment capture 0 N/A N/A env1 env2 N/A N/A N/A hash env1 N/A hash env2 N/A capture_local_env N/A N/A N/A N/A N/A N/A EvalEnvironment capture 0 N/A env3 N/A capture_local_env N/A env4 N/A capture_local_env N/A N/A env3 env4 N/A N/A _builtins_dict N/A N/A N/A N/A six exec_ from patsy.builtins import * N/A _builtins_dict N/A patsy.builtins EvalFactor N/A object N/A __init__ N/A N/A self code origin N/A None N/A N/A A factor class that executes arbitrary Python code and supports
        stateful transforms.

        :arg code: A string containing a Python expression, that will be
          evaluated to produce this factor's value.

        This is the standard factor class that is used when parsing formula
        strings and implements the standard stateful transform processing. See
        :ref:`stateful-transforms` and :ref:`expert-model-specification`.

        Two EvalFactor's are considered equal (e.g., for purposes of
        redundancy detection) if they contain the same token stream. Basically
        this means that the source code must be identical except for
        whitespace::

          assert EvalFactor("a + b") == EvalFactor("a+b")
          assert EvalFactor("a + b") != EvalFactor("b + a")
         N/A N/A self code N/A normalize_token_spacing code N/A N/A self origin origin N/A name N/A N/A self N/A N/A N/A N/A self code N/A __repr__ N/A N/A self N/A N/A N/A N/A %s(%r) N/A N/A N/A self __class__ __name__ N/A self code N/A __eq__ N/A N/A self other N/A N/A N/A N/A N/A isinstance other EvalFactor N/A N/A self code N/A other code N/A __ne__ N/A N/A self other N/A N/A N/A N/A N/A self other N/A __hash__ N/A N/A self N/A N/A N/A N/A hash N/A EvalFactor N/A self code N/A memorize_passes_needed N/A N/A self state eval_env N/A N/A N/A N/A state N/A transforms N/A N/A eval_env N/A N/A eval_env with_outer_namespace _builtins_dict N/A env_namespace N/A eval_env namespace N/A subset_names N/A name N/A name N/A ast_names N/A self code N/A name env_namespace N/A eval_env N/A N/A eval_env subset subset_names N/A N/A state N/A eval_env eval_env N/A i N/A 0 new_name_maker N/A N/A token N/A N/A N/A value N/A N/A N/A eval_env namespace get token N/A N/A hasattr value __patsy_stateful_transform__ N/A N/A obj_name N/A _patsy_stobj%s__%s__ N/A N/A i N/A 0 token N/A N/A i N/A 0 1 N/A obj N/A N/A value __patsy_stateful_transform__ N/A N/A N/A state N/A transforms N/A obj_name obj N/A N/A obj_name .transform N/A N/A token N/A N/A eval_code N/A replace_bare_funcalls N/A self code new_name_maker N/A N/A state N/A eval_code eval_code N/A N/A has_bare_variable_reference N/A state N/A transforms N/A self code N/A N/A N/A PatsyError N/A names of this form are reserved for internal use (%s) N/A token N/A token origin N/A N/A state N/A memorize_code N/A N/A obj_name N/A state N/A transforms N/A N/A transform_calls N/A capture_obj_method_calls obj_name eval_code N/A N/A N/A len transform_calls 1 N/A transform_call N/A transform_calls N/A 0 N/A N/A transform_call_name transform_call_code transform_call N/A N/A transform_call_name N/A obj_name .transform N/A N/A N/A transform_call_code startswith N/A transform_call_name ( N/A memorize_code N/A N/A obj_name .memorize_chunk N/A transform_call_code N/A N/A len transform_call_name N/A N/A N/A state N/A memorize_code N/A obj_name memorize_code N/A pass_bins N/A N/A unsorted N/A set N/A state N/A transforms N/A unsorted N/A N/A pass_bin N/A set N/A obj_name unsorted N/A N/A other_objs N/A N/A unsorted difference N/A obj_name N/A memorize_code N/A N/A state N/A memorize_code N/A obj_name N/A N/A N/A has_bare_variable_reference other_objs memorize_code N/A N/A N/A N/A pass_bin add obj_name N/A pass_bin N/A N/A N/A unsorted difference_update pass_bin N/A N/A N/A pass_bins append pass_bin N/A N/A state N/A pass_bins pass_bins N/A N/A len pass_bins N/A _eval N/A N/A self code memorize_state data N/A N/A N/A inner_namespace N/A VarLookupDict N/A data N/A memorize_state N/A transforms N/A N/A call_and_wrap_exc Error evaluating factor self N/A N/A memorize_state N/A eval_env eval code inner_namespace inner_namespace N/A memorize_chunk N/A N/A self state which_pass data N/A N/A N/A obj_name N/A N/A state N/A pass_bins N/A which_pass N/A N/A N/A N/A self _eval N/A N/A state N/A memorize_code N/A obj_name state data N/A memorize_finish N/A N/A self state which_pass N/A N/A N/A obj_name N/A N/A state N/A pass_bins N/A which_pass N/A N/A N/A N/A N/A N/A state N/A transforms N/A obj_name memorize_finish N/A eval N/A N/A self memorize_state data N/A N/A N/A N/A N/A self _eval N/A memorize_state N/A eval_code memorize_state data N/A N/A __getstate__ no_pickling N/A test_EvalFactor_basics N/A N/A N/A N/A N/A e N/A EvalFactor a+b N/A N/A N/A e code a + b N/A N/A N/A N/A e name a + b N/A e2 N/A EvalFactor a    +b origin asdf N/A N/A e e2 N/A N/A N/A hash e N/A hash e2 N/A N/A N/A e origin None N/A N/A N/A e2 origin asdf N/A N/A assert_no_pickling e N/A test_EvalFactor_memorize_passes_needed N/A N/A N/A N/A patsy.state stateful_transform N/A foo N/A stateful_transform N/A N/A N/A N/A FOO-OBJ N/A bar N/A stateful_transform N/A N/A N/A N/A BAR-OBJ N/A quux N/A stateful_transform N/A N/A N/A N/A QUUX-OBJ N/A e N/A EvalFactor foo(x) + bar(foo(y)) + quux(z, w) N/A state N/A N/A eval_env N/A N/A EvalEnvironment capture 0 N/A passes N/A N/A e memorize_passes_needed state eval_env N/A passes N/A state N/A N/A passes 2 N/A name N/A foo bar quux N/A N/A N/A N/A N/A N/A state N/A eval_env namespace N/A name N/A N/A locals N/A name N/A name N/A w x y z e state N/A N/A N/A name N/A N/A state N/A eval_env namespace N/A N/A N/A state N/A transforms N/A _patsy_stobj0__foo__ _patsy_stobj1__bar__ _patsy_stobj2__foo__ _patsy_stobj3__quux__ FOO-OBJ BAR-OBJ FOO-OBJ QUUX-OBJ N/A N/A N/A state N/A eval_code _patsy_stobj0__foo__.transform(x) + _patsy_stobj1__bar__.transform(_patsy_stobj2__foo__.transform(y)) + _patsy_stobj3__quux__.transform(z, w) N/A N/A N/A state N/A memorize_code N/A _patsy_stobj0__foo__ _patsy_stobj1__bar__ _patsy_stobj2__foo__ _patsy_stobj3__quux__ _patsy_stobj0__foo__.memorize_chunk(x) _patsy_stobj1__bar__.memorize_chunk(_patsy_stobj2__foo__.transform(y)) _patsy_stobj2__foo__.memorize_chunk(y) _patsy_stobj3__quux__.memorize_chunk(z, w) N/A N/A N/A state N/A pass_bins N/A N/A set N/A _patsy_stobj0__foo__ _patsy_stobj2__foo__ _patsy_stobj3__quux__ N/A set N/A _patsy_stobj1__bar__ N/A _MockTransform N/A object N/A __init__ N/A N/A self N/A N/A N/A N/A self _sum 0 N/A N/A self _memorize_chunk_called 0 N/A N/A self _memorize_finish_called 0 N/A memorize_chunk N/A N/A self data N/A N/A N/A N/A self _memorize_chunk_called 1 N/A numpy np N/A N/A self _sum N/A N/A np sum data N/A memorize_finish N/A N/A self N/A N/A N/A N/A self _memorize_finish_called 1 N/A transform N/A N/A self data N/A N/A N/A N/A data N/A self _sum N/A N/A test_EvalFactor_end_to_end N/A N/A N/A N/A patsy.state stateful_transform N/A foo N/A stateful_transform _MockTransform N/A e N/A EvalFactor foo(x) + foo(foo(y)) N/A state N/A N/A eval_env N/A N/A EvalEnvironment capture 0 N/A passes N/A N/A e memorize_passes_needed state eval_env N/A passes N/A state N/A N/A passes 2 N/A N/A N/A N/A N/A state N/A eval_env namespace N/A foo foo N/A name N/A x y e state N/A N/A N/A name N/A N/A state N/A eval_env namespace N/A numpy np N/A N/A N/A e memorize_chunk state 0 N/A x y N/A N/A np array N/A 1 2 N/A N/A np array N/A 10 11 N/A N/A N/A N/A N/A state N/A transforms N/A _patsy_stobj0__foo__ _memorize_chunk_called 1 N/A N/A N/A N/A N/A state N/A transforms N/A _patsy_stobj2__foo__ _memorize_chunk_called 1 N/A N/A N/A e memorize_chunk state 0 N/A x y N/A N/A np array N/A 12 -10 N/A N/A np array N/A 100 3 N/A N/A N/A N/A N/A state N/A transforms N/A _patsy_stobj0__foo__ _memorize_chunk_called 2 N/A N/A N/A N/A N/A state N/A transforms N/A _patsy_stobj2__foo__ _memorize_chunk_called 2 N/A N/A N/A N/A N/A state N/A transforms N/A _patsy_stobj0__foo__ _memorize_finish_called 0 N/A N/A N/A N/A N/A state N/A transforms N/A _patsy_stobj2__foo__ _memorize_finish_called 0 N/A N/A N/A e memorize_finish state 0 N/A N/A N/A N/A N/A state N/A transforms N/A _patsy_stobj0__foo__ _memorize_finish_called 1 N/A N/A N/A N/A N/A state N/A transforms N/A _patsy_stobj2__foo__ _memorize_finish_called 1 N/A N/A N/A N/A N/A state N/A transforms N/A _patsy_stobj1__foo__ _memorize_chunk_called 0 N/A N/A N/A N/A N/A state N/A transforms N/A _patsy_stobj1__foo__ _memorize_finish_called 0 N/A N/A N/A e memorize_chunk state 1 N/A x y N/A N/A np array N/A 1 2 N/A N/A np array N/A 10 11 N/A N/A N/A e memorize_chunk state 1 N/A x y N/A N/A np array N/A 12 -10 N/A N/A np array N/A 100 3 N/A N/A N/A e memorize_finish state 1 N/A transform N/A N/A six itervalues N/A state N/A transforms N/A N/A N/A N/A transform _memorize_chunk_called 2 N/A N/A N/A transform _memorize_finish_called 1 N/A N/A N/A np all N/A N/A N/A e eval state N/A x y N/A N/A np array N/A 1 2 12 -10 N/A N/A np array N/A 10 11 100 3 N/A 254 256 355 236 N/A annotated_tokens N/A N/A code N/A N/A N/A prev_was_dot False N/A it N/A PushbackAdapter N/A python_tokenize code N/A N/A token_type token origin it N/A N/A props N/A N/A N/A props N/A bare_ref N/A N/A prev_was_dot N/A token_type N/A tokenize NAME N/A N/A props N/A bare_funcall N/A N/A props N/A bare_ref N/A N/A it has_more N/A N/A N/A N/A it peek N/A 1 ( N/A N/A N/A token_type token origin props N/A prev_was_dot N/A token . N/A test_annotated_tokens N/A N/A N/A N/A N/A tokens_without_origins N/A N/A token_type token props N/A N/A token_type token origin props N/A annotated_tokens a(b) + c.d N/A N/A tokens_without_origins N/A N/A N/A tokenize NAME a N/A bare_ref bare_funcall True True N/A N/A tokenize OP ( N/A bare_ref bare_funcall False False N/A N/A tokenize NAME b N/A bare_ref bare_funcall True False N/A N/A tokenize OP ) N/A bare_ref bare_funcall False False N/A N/A tokenize OP + N/A bare_ref bare_funcall False False N/A N/A tokenize NAME c N/A bare_ref bare_funcall True False N/A N/A tokenize OP . N/A bare_ref bare_funcall False False N/A N/A tokenize NAME d N/A bare_ref bare_funcall False False N/A N/A N/A len N/A list N/A annotated_tokens x 1 N/A has_bare_variable_reference N/A N/A names code N/A N/A N/A N/A _ token _ props N/A annotated_tokens code N/A N/A N/A N/A props N/A bare_ref N/A token names N/A N/A True N/A False N/A replace_bare_funcalls N/A N/A code replacer N/A N/A N/A tokens N/A N/A N/A token_type token origin props N/A annotated_tokens code N/A N/A N/A N/A props N/A bare_ref N/A props N/A bare_funcall N/A N/A token N/A replacer token N/A N/A N/A tokens append N/A token_type token N/A N/A pretty_untokenize tokens N/A test_replace_bare_funcalls N/A N/A N/A N/A replacer1 N/A N/A token N/A N/A N/A N/A N/A N/A a foo b _internal.foo.process get token token N/A t1 N/A N/A code expected N/A N/A N/A replaced N/A replace_bare_funcalls code replacer1 N/A N/A %r -> %r N/A code replaced N/A N/A (wanted %r) N/A expected N/A N/A replaced expected N/A N/A N/A t1 foobar() foobar() N/A N/A t1 a() b() N/A N/A t1 foobar.a() foobar.a() N/A N/A t1 foo() _internal.foo.process() N/A N/A t1 a + 1 a + 1 N/A N/A t1 b() + a() * x[foo(2 ** 3)] b() + b() * x[_internal.foo.process(2 ** 3)] N/A _FuncallCapturer N/A object N/A __init__ N/A N/A self start_token_type start_token N/A N/A N/A N/A self func N/A start_token N/A N/A self tokens N/A N/A start_token_type start_token N/A N/A self paren_depth 0 N/A N/A self started False N/A N/A self done False N/A add_token N/A N/A self token_type token N/A N/A N/A N/A self done N/A N/A N/A N/A N/A N/A self tokens append N/A token_type token N/A N/A token N/A ( { [ N/A N/A N/A self paren_depth 1 N/A N/A token N/A ) } ] N/A N/A N/A self paren_depth 1 N/A N/A N/A self paren_depth 0 N/A N/A N/A self started N/A N/A N/A token ( N/A N/A N/A self started True N/A N/A N/A N/A token_type N/A tokenize NAME N/A token . N/A N/A N/A N/A self func append token N/A N/A N/A self started N/A N/A self paren_depth 0 N/A N/A N/A self done True N/A N/A capture_obj_method_calls N/A N/A obj_name code N/A N/A N/A capturers N/A N/A N/A token_type token origin props N/A annotated_tokens code N/A N/A capturer capturers N/A N/A N/A N/A capturer add_token token_type token N/A N/A N/A props N/A bare_ref N/A token obj_name N/A N/A N/A N/A capturers append N/A _FuncallCapturer token_type token N/A N/A N/A N/A N/A join N/A capturer func N/A pretty_untokenize N/A capturer tokens N/A capturer capturers N/A test_capture_obj_method_calls N/A N/A N/A N/A N/A N/A N/A capture_obj_method_calls foo a + foo.baz(bar) + b.c(d) N/A N/A foo.baz foo.baz(bar) N/A N/A N/A capture_obj_method_calls b a + foo.baz(bar) + b.c(d) N/A N/A b.c b.c(d) N/A N/A N/A capture_obj_method_calls foo foo.bar(foo.baz(quux)) N/A N/A foo.bar foo.bar(foo.baz(quux)) N/A foo.baz foo.baz(quux) N/A N/A N/A capture_obj_method_calls bar foo[bar.baz(x(z[asdf])) ** 2] N/A N/A bar.baz bar.baz(x(z[asdf])) N/A