Module Expr Str Import alias identifier Import alias Import alias Import alias ImportFrom alias ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Str ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults kwarg body Expr Str Expr Call AttributeLoad Call NameLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad If Call AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr Call NameLoad If Call AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpDiv Num NameLoad Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Num BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Str BinOpDiv Num NameLoad If CompareGt NameLoad Num body Assign AttributeStore NameLoad attr BinOpSub Call NameLoad Call AttributeLoad NameLoad attr NameLoad Num Assign AttributeStore NameLoad attr BinOpSub NameLoad Num Assign NameStore BinOpSub Call NameLoad BinOpMult NameLoad NameLoad Num Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore NameLoad Assign NameStore Call NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore UnaryOpUSub AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr While Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr AugAssignAdd NameStore Num Assign NameStore BinOpMult BinOpAdd NameLoad Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad If SubscriptLoad AttributeLoad NameLoad attr Index Str body If BoolOpAnd CompareIsNot NameLoad NameLoad CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad orelse If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr NameLoad body If BoolOpAnd Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr BinOpSub NameLoad Num body Assign NameStore NameLoad orelse Assign NameStore Call NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad body If Call AttributeLoad NameLoad attr NameLoad body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr Str UnaryOpNot SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str body If Call AttributeLoad NameLoad attr NameLoad body If Call AttributeLoad NameLoad attr Str body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If BoolOpAnd Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num body If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad orelse Assign NameStore Call NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AugAssignSub NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr Str keyword NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr orelse Assert CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr AugAssignAdd NameStore NameLoad If SubscriptLoad AttributeLoad NameLoad attr Index Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Num body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If CompareGt NameLoad BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index Str Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If BoolOpAnd NameLoad CompareGt NameLoad Num UnaryOpNot Call AttributeLoad NameLoad attr Str body Break Assign NameStore NameLoad If NameLoad body Assign NameStore Str orelse Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad Return TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr BinOpMod Str NameLoad If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad Str CompareLt AttributeLoad NameLoad attr Num body If BoolOpAnd Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad body If CompareGt SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Num body Pass orelse If CompareLt NameLoad Call AttributeLoad NameLoad attr NameLoad body Assert CompareGt BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num orelse If CompareGt Call NameLoad BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num body Print BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert CompareLt Call NameLoad BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num orelse If CompareGtE NameLoad Num body Assert CompareLt Call NameLoad BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num If Call NameLoad NameLoad Str body If UnaryOpNot Call AttributeLoad NameLoad attr CompareGtE AttributeLoad NameLoad attr Num body Raise Call NameLoad Str Assign SubscriptStore AttributeLoad NameLoad attr Index CompareLt AttributeLoad NameLoad attr Num Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If Call AttributeLoad NameLoad attr Str body For NameStore AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str If BoolOpAnd CompareLt NameLoad AttributeLoad NameLoad attr CompareLt NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr Str body Assign NameStore BinOpSub NameLoad AttributeLoad NameLoad attr If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr Str CompareIsNot NameLoad NameLoad body If BoolOpAnd CompareIsNot NameLoad NameLoad CompareGt Call NameLoad NameLoad Num body Assign NameStore NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr Str CompareIsNot NameLoad NameLoad body For NameStore AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str For NameStore AttributeLoad NameLoad attr body If CompareGtE NameLoad SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Index Num body Return NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad ExtSlice Slice Index NameLoad BinOpAdd SubscriptLoad SubscriptLoad NameLoad Index NameLoad ExtSlice Slice Index NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad ExtSlice Slice Index NameLoad Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad NameLoad keyword Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Delete SubscriptDel NameLoad Index NameLoad If CompareGt Call NameLoad Call AttributeLoad NameLoad attr Num body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad orelse Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore CompareLtE NameLoad BinOpAdd SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Num Assign NameStore CompareLtE NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Return BoolOpAnd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Call NameLoad NameLoad body Expr Str If CompareIsNot NameLoad NameLoad body If Call NameLoad NameLoad Str body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str If CompareGt NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr keyword Num Assign NameStore CompareGtE NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str keyword AttributeLoad NameLoad attr keyword NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword NameLoad keyword Num Assign NameStore ListLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str orelse If CompareLt AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str body Assign NameStore Str Assign NameStore BinOpMod NameLoad AttributeLoad NameLoad attr orelse If BoolOpAnd Call NameLoad NameLoad Str CompareLt AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str body Assign NameStore Str Assign NameStore BinOpMod NameLoad AttributeLoad NameLoad attr orelse Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore SubscriptLoad NameLoad Index Str If SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore SubscriptLoad NameLoad Index Str body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Num If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad BinOpAdd NameLoad Num NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad BinOpAdd NameLoad Num NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore NameLoad For NameStore NameLoad body If SubscriptLoad NameLoad Index Str body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assert CompareEq AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If CompareIsNot NameLoad NameLoad body Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call NameLoad NameLoad body AugAssignAdd SubscriptStore AttributeLoad NameLoad attr Index NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad For NameStore Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Import alias For NameStore NameLoad body If CompareIs SubscriptLoad NameLoad Index Str NameLoad body Continue Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str If CompareIsNot SubscriptLoad NameLoad Index Str NameLoad body If Call NameLoad SubscriptLoad NameLoad Index Str Str body If CompareGtE AttributeLoad SubscriptLoad NameLoad Index Str attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str body Continue AugAssignSub SubscriptStore NameLoad Index Str AttributeLoad SubscriptLoad NameLoad Index Str attr orelse If CompareGtE AttributeLoad SubscriptLoad NameLoad Index Str attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str body Continue Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad SubscriptLoad NameLoad Index Str keyword AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body If CompareIs SubscriptLoad NameLoad Index Str NameLoad body Assign SubscriptStore NameLoad Index Str Str orelse If CompareIs SubscriptLoad NameLoad Index Str NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad orelse Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad Assign SubscriptStore NameLoad Index Str BinOpMod Str AttributeLoad SubscriptLoad NameLoad Index Str attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Num For NameStore NameLoad body AugAssignAdd NameStore Call NameLoad SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body If CompareGt SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Num body Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str ImportFrom alias If BoolOpAnd Call AttributeLoad NameLoad attr Str CompareGt Call NameLoad AttributeLoad NameLoad attr Num body Assign NameStore ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr orelse Assign NameStore Call NameLoad Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareGt AttributeLoad NameLoad attr Num body AugAssignAdd NameStore BinOpMod Str BinOpSub NameLoad NameLoad If CompareGtE SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Num body Expr Call AttributeLoad NameLoad attr NameLoad If CompareGt SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Num body For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr Str body For TupleStore NameStore NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad For TupleStore NameStore NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad keyword NameLoad keyword NameLoad If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If CompareEq NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse If CompareLt NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse If CompareGt NameLoad NameLoad body Assign SubscriptStore NameLoad Index BinOpSub NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Import alias Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Lambda arguments args defaults Call NameLoad Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Assign NameStore Num While CompareLt NameLoad NameLoad body For NameStore NameLoad body For NameStore NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad For NameStore NameLoad body If CompareGt Call NameLoad SubscriptLoad NameLoad Index NameLoad BinOpSub AttributeLoad AttributeLoad NameLoad attr attr Num body If CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareGt Call NameLoad NameLoad BinOpSub AttributeLoad AttributeLoad NameLoad attr attr Num body Expr Call AttributeLoad NameLoad attr Str Break If BoolOpAnd Call AttributeLoad NameLoad attr Str CompareGt Call NameLoad AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIn NameLoad NameLoad body Continue orelse Assign NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str If BoolOpAnd CompareIn Str NameLoad CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad If SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad keyword NameLoad keyword NameLoad For NameStore Call NameLoad Call NameLoad NameLoad body If CompareGt SubscriptLoad NameLoad Index NameLoad NameLoad body AugAssignSub SubscriptStore NameLoad Index NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Lambda arguments args defaults Call NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index NameLoad AugAssignSub SubscriptStore NameLoad Index CompareGt NameLoad NameLoad Num If CompareGt NameLoad NameLoad body Assign SubscriptStore NameLoad Index BinOpSub NameLoad Num Call NameLoad NameLoad orelse If CompareLt NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad Assign NameStore NameLoad If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If CompareEq NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse If CompareLt NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse If CompareGt NameLoad NameLoad body Assign SubscriptStore NameLoad Index BinOpSub NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign AttributeStore NameLoad attr NameLoad If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad decorator_list decorator_list
N/A N/A 
MemoizedOnlineVBLearnAlg.py

Implementation of Memoized Online VB (moVB) learn alg for bnpy models
 N/A numpy np N/A joblib N/A os N/A logging collections defaultdict bnpy.util isEvenlyDivisibleFloat N/A BirthMove N/A MergeMove LearnAlg LearnAlg bnpy.suffstats SuffStatBag N/A Log N/A N/A logging getLogger bnpy MemoizedOnlineVBLearnAlg N/A LearnAlg N/A __init__ N/A N/A self N/A kwargs N/A N/A  Creates memoized VB learning algorithm object,
          including specialized internal fields to hold "memoized" statistics
     N/A N/A N/A N/A super N/A type self self __init__ kwargs N/A N/A self SSmemory N/A dict N/A N/A self LPmemory N/A dict N/A N/A N/A self hasMove merge N/A N/A N/A self MergeLog N/A list N/A N/A N/A self hasMove birth N/A N/A N/A self BirthCompIDs N/A list N/A N/A self ModifiedCompIDs N/A list N/A N/A self LapsSinceLastBirth N/A defaultdict int N/A fit N/A N/A self hmodel DataIterator N/A N/A N/A  Run moVB learning algorithm, fit parameters of hmodel to Data,
          traversed one batch at a time from DataIterator

        Returns
        --------
        LP : None type, cannot fit all local params in memory
        Info : dict of run information, with fields
              evBound : final ELBO evidence bound
              status : str message indicating reason for termination
                        {'converged', 'max passes exceeded'}
    
     N/A nBatch N/A float N/A DataIterator nBatch N/A N/A self lapFracInc N/A 1.0 nBatch N/A iterid -1 N/A lapFrac N/A N/A np maximum 0 N/A N/A N/A self algParams N/A startLap N/A 1.0 nBatch N/A N/A lapFrac 0 N/A N/A N/A DataIterator lapID N/A N/A int N/A N/A np ceil lapFrac 1 N/A N/A DataIterator curLapPos N/A nBatch 2 N/A iterid N/A N/A int N/A nBatch lapFrac 1 N/A N/A self memoLPkeys N/A N/A N/A hmodel allocModel get_keys_for_memoized_local_params N/A mPairIDs None N/A BirthPlans N/A list N/A BirthResults None N/A prevBirthResults None N/A SS None N/A isConverged False N/A prevBound N/A N/A np inf N/A N/A N/A self set_start_time_now N/A N/A N/A DataIterator has_next_batch N/A N/A Dchunk N/A N/A DataIterator get_next_batch N/A batchID N/A DataIterator batchID N/A iterid 1 N/A lapFrac N/A N/A iterid 1 N/A self lapFracInc N/A N/A N/A self set_random_seed_at_lap lapFrac N/A N/A N/A self algParams N/A doFullPassBeforeMstep N/A N/A N/A N/A SS None N/A lapFrac 1.0 N/A N/A N/A N/A hmodel update_global_params SS N/A N/A N/A SS None N/A N/A N/A N/A hmodel update_global_params SS N/A N/A N/A self isFirstBatch lapFrac N/A N/A N/A N/A N/A self hasMove birth N/A N/A self do_birth_at_lap N/A lapFrac 1.0 N/A N/A prevBirthResults BirthResults N/A N/A prevBirthResults N/A list N/A N/A N/A N/A self hasMove birth N/A N/A self do_birth_at_lap lapFrac N/A N/A N/A N/A self doBirthWithPlannedData lapFrac N/A N/A N/A hmodel SS BirthResults N/A N/A self birth_create_new_comps hmodel SS BirthPlans N/A N/A N/A self doBirthWithDataFromCurrentBatch lapFrac N/A N/A N/A hmodel SS BirthRes N/A N/A self birth_create_new_comps hmodel SS Data Dchunk N/A N/A N/A BirthResults extend BirthRes N/A N/A self BirthCompIDs N/A N/A self birth_get_all_new_comps BirthResults N/A N/A self ModifiedCompIDs N/A N/A self birth_get_all_modified_comps BirthResults N/A N/A BirthResults N/A list N/A N/A self BirthCompIDs N/A list N/A N/A self ModifiedCompIDs N/A list N/A N/A N/A N/A self hasMove merge N/A N/A N/A N/A self algParams N/A merge N/A doAllPairs N/A N/A N/A N/A self isFirstBatch lapFrac N/A N/A N/A N/A self hasMove birth N/A N/A compIDs N/A self BirthCompIDs N/A N/A compIDs N/A N/A mPairIDs N/A N/A MergeMove preselect_all_merge_candidates hmodel SS randstate N/A self PRNG compIDs compIDs N/A N/A self algParams N/A merge N/A N/A batchID N/A self LPmemory N/A N/A oldLPchunk N/A N/A self load_batch_local_params_from_memory batchID prevBirthResults N/A LPchunk N/A N/A hmodel calc_local_params Dchunk oldLPchunk N/A self algParamsLP N/A N/A LPchunk N/A N/A hmodel calc_local_params Dchunk N/A self algParamsLP N/A N/A N/A N/A self hasMove birth N/A N/A self do_birth_at_lap N/A lapFrac 1.0 N/A N/A N/A N/A self isFirstBatch lapFrac N/A N/A BirthPlans N/A N/A self birth_select_targets_for_next_lap hmodel SS BirthResults N/A BirthPlans N/A N/A self birth_collect_target_subsample Dchunk LPchunk BirthPlans N/A N/A BirthPlans N/A list N/A N/A batchID N/A self SSmemory N/A N/A SSchunk N/A N/A self load_batch_suff_stat_from_memory batchID N/A SS K N/A SS SSchunk N/A SSchunk N/A N/A hmodel get_global_suff_stats Dchunk LPchunk doPrecompEntropy True doPrecompMergeEntropy N/A N/A self hasMove merge mPairIDs mPairIDs N/A N/A SS None N/A N/A SS N/A N/A SSchunk copy N/A N/A N/A N/A SSchunk K N/A SS K N/A SS SSchunk N/A N/A N/A self algParams N/A doMemoizeLocalParams N/A N/A N/A N/A self save_batch_local_params_to_memory batchID LPchunk N/A N/A N/A self save_batch_suff_stat_to_memory batchID SSchunk N/A N/A N/A N/A self hasMove birth N/A N/A self isLastBatch lapFrac N/A N/A N/A hmodel SS N/A N/A self birth_remove_extra_mass hmodel SS BirthResults N/A evBound N/A N/A hmodel calc_evidence SS SS N/A N/A N/A N/A self hasMove merge N/A isEvenlyDivisibleFloat lapFrac 1.0 N/A N/A N/A hmodel SS evBound N/A N/A self run_merge_move hmodel SS evBound mPairIDs N/A N/A N/A self add_nObs N/A Dchunk nObs N/A N/A N/A self save_state hmodel iterid lapFrac evBound N/A N/A N/A self print_state hmodel iterid lapFrac evBound N/A N/A N/A self eval_custom_func hmodel iterid lapFrac N/A N/A lapFrac N/A N/A N/A self algParams N/A startLap 1.0 N/A N/A isConverged N/A N/A self verify_evidence evBound prevBound lapFrac N/A N/A isConverged N/A lapFrac 5 N/A N/A N/A self hasMove birth N/A N/A N/A prevBound evBound N/A isConverged N/A N/A msg converged. N/A N/A msg max passes thru data exceeded. N/A N/A N/A self save_state hmodel iterid lapFrac evBound doFinal True N/A N/A N/A self print_state hmodel iterid lapFrac evBound doFinal True status msg N/A N/A None N/A N/A self buildRunInfo evBound msg N/A verify_suff_stats N/A N/A self Dchunk SS lap N/A N/A N/A  Run-time checks to make sure the suff stats
        have expected values
     N/A N/A N/A self savedir None N/A N/A SSfile N/A N/A N/A os path join N/A self savedir N/A SSdump-Lap%03d.dat lap N/A N/A N/A self isLastBatch lap N/A N/A N/A N/A joblib dump SS SSfile N/A N/A N/A hasattr Dchunk nDocTotal N/A N/A Dchunk nDocTotal 4000 N/A N/A N/A N/A N/A self hasMove birth N/A N/A self do_birth_at_lap lap N/A N/A N/A N/A N/A N/A self algParams N/A birth N/A earlyLap 0 N/A N/A N/A N/A N/A lap N/A N/A np ceil lap N/A N/A N/A N/A N/A SS nDoc N/A Dchunk nDocTotal -0.001 N/A N/A N/A N/A abs N/A N/A SS nDoc N/A Dchunk nDocTotal 0.01 N/A N/A N/A WARNING @ lap %.2f | SS.nDoc=%d, nDocTotal=%d N/A lap N/A SS nDoc N/A Dchunk nDocTotal N/A N/A N/A abs N/A N/A SS nDoc N/A Dchunk nDocTotal 0.01 N/A N/A N/A lap 1.0 N/A N/A N/A N/A abs N/A N/A SS nDoc N/A Dchunk nDocTotal 0.01 N/A N/A hasattr SS N N/A N/A N/A N/A N/A np all N/A N/A SS N -1e-09 N/A N/A N/A ValueError N should be >= 0! N/A N/A N/A SS N N/A N/A N/A SS N 0 0 N/A load_batch_suff_stat_from_memory N/A N/A self batchID K N/A N/A N/A  Load the suff stats stored in memory for provided batchID
        Returns
        -------
        SSchunk : bnpy SuffStatDict object for batchID
     N/A SSchunk N/A N/A self SSmemory N/A batchID N/A N/A N/A self hasMove merge N/A N/A MInfo N/A self MergeLog N/A N/A kA N/A MInfo N/A kA N/A kB N/A MInfo N/A kB N/A N/A N/A kA N/A SSchunk K N/A kB N/A SSchunk K N/A N/A N/A N/A SSchunk mergeComps kA kB N/A N/A N/A SSchunk hasMergeTerms N/A N/A N/A N/A SSchunk setMergeFieldsToZero N/A N/A N/A self hasMove birth N/A N/A Kextra N/A K N/A SSchunk K N/A N/A Kextra 0 N/A N/A N/A N/A SSchunk insertEmptyComps Kextra N/A N/A N/A SSchunk K K N/A SSchunk N/A load_batch_local_params_from_memory N/A N/A self batchID BirthResults N/A N/A N/A  Load local parameter dict stored in memory for provided batchID
        Ensures "fast-forward" so that all recent merges/births
          are accounted for in the returned LP
        Returns
        -------
        LPchunk : bnpy local parameters dictionary for batchID
     N/A LPchunk N/A N/A self LPmemory N/A batchID N/A N/A N/A N/A self hasMove birth N/A LPchunk None N/A N/A N/A N/A BirthResults None N/A N/A len BirthResults 0 N/A N/A LPchunk None N/A N/A N/A N/A self hasMove merge N/A LPchunk None N/A N/A MInfo N/A self MergeLog N/A N/A kA N/A MInfo N/A kA N/A kB N/A MInfo N/A kB N/A key N/A self memoLPkeys N/A N/A N/A kB N/A N/A N/A LPchunk N/A key shape N/A 1 N/A N/A None N/A N/A N/A LPchunk N/A key N/A N/A N/A kA N/A N/A N/A LPchunk N/A key N/A N/A N/A kA N/A N/A LPchunk N/A key N/A N/A N/A kB N/A N/A LPchunk N/A key N/A N/A np delete N/A LPchunk N/A key kB axis 1 N/A LPchunk N/A save_batch_suff_stat_to_memory N/A N/A self batchID SSchunk N/A N/A N/A  Store the provided suff stats into the "memory" for later retrieval
     N/A N/A N/A self SSmemory N/A batchID SSchunk N/A save_batch_local_params_to_memory N/A N/A self batchID LPchunk N/A N/A N/A  Store certain fields of the provided local parameters dict
          into "memory" for later retrieval.
        Fields to save determined by the memoLPkeys attribute of this alg.
     N/A allkeys N/A N/A LPchunk keys N/A key allkeys N/A N/A N/A key N/A self memoLPkeys N/A N/A N/A LPchunk N/A key N/A N/A N/A len N/A N/A LPchunk keys 0 N/A N/A N/A N/A self LPmemory N/A batchID LPchunk N/A N/A N/A N/A self LPmemory N/A batchID None N/A doBirthWithPlannedData N/A N/A self lapFrac N/A N/A N/A N/A N/A self isFirstBatch lapFrac N/A doBirthWithDataFromCurrentBatch N/A N/A self lapFrac N/A N/A N/A N/A N/A self isLastBatch lapFrac N/A N/A False N/A rem N/A lapFrac N/A N/A np floor lapFrac N/A isWithinFrac N/A rem N/A N/A N/A N/A self algParams N/A birth N/A batchBirthFrac 1e-06 N/A isWithinLimit N/A lapFrac N/A N/A N/A self algParams N/A birth N/A batchBirthLapLimit N/A N/A isWithinFrac isWithinLimit N/A birth_create_new_comps N/A N/A self hmodel SS BirthPlans Data N/A N/A list None N/A N/A  Create new components 

        Returns
        -------
        hmodel : bnpy HModel, with (possibly) new components
        SS : bnpy SuffStatBag, with (possibly) new components
        BirthResults : list of dictionaries, one entry per birth move
                        each entry has fields
                        * TODO
     N/A N/A Data None N/A N/A N/A hasattr Data nDoc N/A N/A wordPerDocThr N/A N/A N/A self algParams N/A birth N/A birthWordsPerDocThr N/A N/A wordPerDocThr 0 N/A N/A nWordPerDoc N/A N/A np asarray N/A N/A N/A N/A Data to_sparse_docword_matrix sum axis 1 N/A candidates N/A nWordPerDoc wordPerDocThr N/A candidates N/A N/A np flatnonzero candidates N/A N/A candidates None N/A targetData N/A N/A Data get_random_sample N/A N/A N/A self algParams N/A birth N/A maxTargetSize randstate N/A self PRNG candidates candidates N/A N/A targetData N/A N/A Data get_random_sample N/A N/A N/A self algParams N/A birth N/A maxTargetObs randstate N/A self PRNG N/A Plan N/A dict Data targetData ktarget -1 N/A BirthPlans N/A Plan N/A nMoves N/A len BirthPlans N/A BirthResults N/A list N/A N/A moveID Plan N/A enumerate BirthPlans N/A N/A ktarget N/A Plan N/A ktarget N/A targetData N/A Plan N/A Data N/A N/A N/A ktarget None N/A targetData None N/A N/A msg N/A Plan N/A msg N/A N/A N/A N/A targetData nObs N/A N/A N/A self algParams N/A birth N/A minTargetObs N/A N/A msg BIRTH skipped. Target data too small (size %d) N/A msg N/A msg N/A targetData nObs N/A N/A N/A N/A hasattr targetData nDoc N/A N/A targetData nDoc N/A N/A N/A self algParams N/A birth N/A minTargetSize N/A N/A msg BIRTH skipped. Target data too small (size %d) N/A msg N/A msg N/A targetData nDoc N/A N/A N/A hmodel SS MoveInfo N/A N/A BirthMove run_birth_move hmodel targetData SS randstate N/A self PRNG ktarget ktarget N/A N/A self algParams N/A birth N/A msg N/A MoveInfo N/A msg N/A N/A MoveInfo N/A didAddNew N/A N/A N/A N/A BirthResults append MoveInfo N/A kk N/A MoveInfo N/A birthCompIDs N/A N/A N/A N/A self LapsSinceLastBirth N/A kk -1 N/A N/A Data None N/A N/A N/A N/A self print_msg N/A %d/%d %s N/A N/A moveID 1 nMoves msg N/A N/A N/A N/A self print_msg N/A %d/%d BATCH %s N/A N/A moveID 1 nMoves msg N/A N/A hmodel SS BirthResults N/A birth_remove_extra_mass N/A N/A self hmodel SS BirthResults N/A N/A N/A  Adjust hmodel and suff stats to remove the "extra mass"
          added during a birth move to brand-new components.
        After this call, SS should have scale exactly consistent with 
          the entire dataset (all B batches).

        Returns
        -------
        hmodel : bnpy HModel
        SS : bnpy SuffStatBag
     N/A didChangeSS False N/A MoveInfo BirthResults N/A N/A N/A MoveInfo N/A didAddNew N/A N/A extraSS N/A MoveInfo N/A extraSS N/A compIDs N/A MoveInfo N/A modifiedCompIDs N/A N/A N/A extraSS K N/A len compIDs N/A N/A N/A SS subtractSpecificComps extraSS compIDs N/A didChangeSS True N/A didChangeSS N/A N/A N/A N/A hmodel update_global_params SS N/A N/A hmodel SS N/A birth_select_targets_for_next_lap N/A N/A self hmodel SS BirthResults N/A N/A N/A  Create plans for next lap's birth moves
    
        Returns
        -------
        BirthPlans : list of dicts, 
                     each entry represents the plan for one future birth move
     N/A N/A SS None N/A N/A N/A N/A N/A hmodel allocModel K N/A SS K N/A K N/A N/A hmodel allocModel K N/A kk N/A range K N/A N/A N/A N/A self LapsSinceLastBirth N/A kk 1 N/A excludeList N/A N/A self birth_get_all_new_comps BirthResults N/A BirthPlans N/A list N/A posID N/A range N/A N/A N/A self algParams N/A birth N/A birthPerLap N/A N/A N/A N/A ktarget N/A N/A BirthMove select_birth_component SS K K randstate N/A self PRNG excludeList excludeList doVerbose False lapsSinceLastBirth N/A self LapsSinceLastBirth N/A N/A self algParams N/A birth N/A N/A N/A self LapsSinceLastBirth N/A ktarget 0 N/A N/A N/A excludeList append ktarget N/A Plan N/A dict ktarget ktarget Data None N/A N/A N/A N/A BirthMove BirthProposalError N/A e N/A N/A Plan N/A dict ktarget None Data None msg N/A str e N/A N/A N/A BirthPlans append Plan N/A BirthPlans N/A birth_collect_target_subsample N/A N/A self Dchunk LPchunk BirthPlans N/A N/A N/A  Collect subsample of the data in Dchunk, and add that subsample
          to overall targeted subsample stored in input list BirthPlans
        This overall sample is aggregated across many batches of data.
        Data from Dchunk is only collected if more data is needed.

        Returns
        -------
        BirthPlans : list of planned births for the next lap,
                      updated to include data from Dchunk if needed
     N/A BirthMove N/A Plan BirthPlans N/A N/A N/A N/A Plan N/A ktarget None N/A N/A N/A birthParams N/A dict N/A N/A self algParams N/A birth N/A N/A N/A Plan N/A Data None N/A N/A N/A hasattr N/A Plan N/A Data nDoc N/A N/A N/A N/A N/A Plan N/A Data nDoc N/A N/A N/A self algParams N/A birth N/A maxTargetSize N/A N/A N/A N/A birthParams N/A maxTargetSize N/A N/A Plan N/A Data nDoc N/A N/A N/A N/A N/A Plan N/A Data nObs N/A N/A N/A self algParams N/A birth N/A maxTargetObs N/A N/A N/A targetData N/A N/A BirthMove subsample_data Dchunk LPchunk N/A Plan N/A ktarget randstate N/A self PRNG birthParams N/A N/A targetData None N/A N/A N/A N/A Plan N/A Data None N/A N/A N/A Plan N/A msg TargetData: No samples for target comp found. N/A N/A N/A N/A Plan N/A Data None N/A N/A N/A Plan N/A Data targetData N/A N/A N/A N/A N/A Plan N/A Data add_data targetData N/A N/A Plan N/A msg N/A TargetData: nObs %d N/A N/A Plan N/A Data nObs N/A BirthPlans N/A birth_get_all_new_comps N/A N/A self BirthResults N/A N/A N/A  Returns list of integer ids of all new components added by
          birth moves summarized in BirthResults

        Returns
        -------
        birthCompIDs : list of integers, each entry is index of a new component
     N/A birthCompIDs N/A list N/A MoveInfo BirthResults N/A N/A N/A N/A birthCompIDs extend N/A MoveInfo N/A birthCompIDs N/A birthCompIDs N/A birth_get_all_modified_comps N/A N/A self BirthResults N/A N/A N/A  Returns list of integer ids of all new components added by
          birth moves summarized in BirthResults

        Returns
        -------
        mCompIDs : list of integers, each entry is index of modified comp
     N/A mCompIDs N/A list N/A MoveInfo BirthResults N/A N/A N/A N/A mCompIDs extend N/A MoveInfo N/A modifiedCompIDs N/A mCompIDs N/A birth_count_new_comps N/A N/A self BirthResults N/A N/A N/A  Returns total number of new components added by moves 
          summarized by BirthResults
    
        Returns
        -------
        Kextra : int number of components added by given list of moves
     N/A Kextra 0 N/A MoveInfo BirthResults N/A N/A Kextra N/A len N/A MoveInfo N/A birthCompIDs N/A Kextra N/A run_merge_move N/A N/A self hmodel SS evBound mPairIDs N/A None N/A N/A N/A N/A N/A N/A self algParams N/A merge N/A version 0 N/A N/A N/A N/A self run_merge_move_NEW hmodel SS evBound mPairIDs N/A N/A N/A N/A self run_merge_move_OLD hmodel None SS evBound N/A run_merge_move_NEW N/A N/A self hmodel SS evBound mPairIDs N/A None N/A N/A  Run (potentially many) merge moves on hmodel,
          performing necessary bookkeeping to
            (1) avoid trying the same merge twice
            (2) avoid merging a component that has already been merged,
                since the precomputed entropy will no longer be correct.
        Returns
        -------
        hmodel : bnpy HModel, with (possibly) some merged components
        SS : bnpy SuffStatBag, with (possibly) merged components
        evBound : correct ELBO for returned hmodel
                  guaranteed to be at least as large as input evBound    
     MergeMove run_many_merge_moves N/A N/A N/A N/A self hasMove birth N/A N/A len N/A self BirthCompIDs 0 N/A N/A compList N/A x N/A x N/A self BirthCompIDs N/A N/A compList N/A list N/A nMergeTrials N/A N/A N/A self algParams N/A merge N/A mergePerLap N/A N/A hmodel SS newEvBound MTracker N/A run_many_merge_moves hmodel None SS evBound evBound mPairIDs mPairIDs randstate N/A self PRNG nMergeTrials nMergeTrials compList compList savedir N/A self savedir N/A N/A self algParams N/A merge N/A msg N/A MERGE: %3d/%3d accepted. N/A N/A MTracker nSuccess N/A MTracker nTrial N/A N/A N/A MTracker nSuccess 0 N/A N/A msg N/A  ev improved + %.3e N/A newEvBound evBound N/A N/A N/A N/A N/A self algParams N/A merge N/A doVerbose 0 N/A N/A N/A N/A self print_msg msg N/A N/A N/A N/A N/A self algParams N/A merge N/A doVerbose 0 N/A N/A msg N/A MTracker InfoLog N/A N/A N/A N/A self print_msg msg N/A N/A N/A self hasMove birth N/A N/A N/A kA kB N/A MTracker acceptedIDs N/A N/A N/A N/A self _adjustLapsSinceLastBirthForMerge MTracker kA kB N/A N/A self MergeLog N/A list N/A N/A kA kB N/A MTracker acceptedIDs N/A N/A N/A N/A N/A self MergeLog append N/A dict kA kA kB kB N/A N/A N/A SS hasMergeTerms N/A N/A N/A N/A SS setMergeFieldsToZero N/A N/A hmodel SS newEvBound N/A _adjustLapsSinceLastBirthForMerge N/A N/A self MTracker kA kB N/A N/A N/A  Adjust internal tracking of laps since birth
     N/A compList N/A N/A N/A self LapsSinceLastBirth keys N/A newDict N/A defaultdict int N/A kk compList N/A N/A N/A kk kA N/A N/A N/A newDict N/A kA N/A N/A np maximum N/A N/A self LapsSinceLastBirth N/A kA N/A N/A self LapsSinceLastBirth N/A kB N/A N/A N/A kk kB N/A N/A N/A newDict N/A kk N/A N/A self LapsSinceLastBirth N/A kk N/A N/A N/A kk kB N/A N/A N/A newDict N/A N/A kk 1 N/A N/A self LapsSinceLastBirth N/A kk N/A N/A self LapsSinceLastBirth newDict N/A run_merge_move_OLD N/A N/A self hmodel Data SS evBound N/A N/A N/A  Run (potentially many) merge moves on hmodel,
          performing necessary bookkeeping to
            (1) avoid trying the same merge twice
            (2) avoid merging a component that has already been merged,
                since the precomputed entropy will no longer be correct.
        Returns
        -------
        hmodel : bnpy HModel, with (possibly) some merged components
        SS : bnpy SuffStatBag, with (possibly) merged components
        evBound : correct ELBO for returned hmodel
                  guaranteed to be at least as large as input evBound    
     N/A OldMergeMove N/A N/A self MergeLog N/A list N/A excludeList N/A list N/A excludePairs N/A defaultdict N/A N/A N/A N/A N/A set N/A nMergeAttempts N/A N/A N/A self algParams N/A merge N/A mergePerLap N/A trialID 0 N/A N/A trialID nMergeAttempts N/A N/A kx excludeList N/A N/A kk excludePairs N/A N/A N/A N/A N/A excludePairs N/A kk add kx N/A N/A N/A N/A excludePairs N/A kx add kk N/A kk excludePairs N/A N/A N/A N/A len N/A excludePairs N/A kk N/A N/A N/A hmodel obsModel K 2 N/A N/A N/A kk excludeList N/A N/A N/A N/A excludeList append kk N/A N/A N/A len excludeList N/A N/A N/A hmodel obsModel K 2 N/A N/A N/A N/A Log info Merge Done. No more options to try! N/A N/A N/A N/A N/A self hasMove birth N/A N/A len N/A self BirthCompIDs 0 N/A N/A kA N/A N/A N/A self BirthCompIDs pop N/A N/A kA excludeList N/A N/A N/A N/A kA None N/A N/A hmodel SS evBound MoveInfo N/A N/A OldMergeMove run_merge_move hmodel None SS evBound randstate N/A self PRNG excludeList excludeList excludePairs excludePairs kA kA N/A N/A self algParams N/A merge N/A trialID 1 N/A N/A N/A self print_msg N/A MoveInfo N/A msg N/A N/A N/A kA MoveInfo N/A kB MoveInfo N/A N/A kA N/A MoveInfo N/A kA N/A kB N/A MoveInfo N/A kB N/A N/A N/A N/A excludePairs N/A kA add kB N/A N/A N/A N/A excludePairs N/A kB add kA N/A N/A MoveInfo N/A didAccept N/A N/A N/A N/A N/A self MergeLog append N/A dict kA kA kB kB N/A kk N/A range N/A len excludeList N/A N/A N/A N/A excludeList N/A kk kB N/A N/A N/A excludeList N/A kk 1 N/A N/A N/A excludeList append kA N/A newExcludePairs N/A defaultdict N/A N/A N/A N/A N/A set N/A kk N/A N/A excludePairs keys N/A N/A ksarr N/A N/A np asarray N/A list N/A excludePairs N/A kk N/A N/A ksarr N/A N/A ksarr kB 1 N/A N/A kk kB N/A N/A N/A newExcludePairs N/A N/A kk 1 N/A set ksarr N/A N/A N/A kk kB N/A N/A N/A newExcludePairs N/A kk N/A set ksarr N/A excludePairs newExcludePairs N/A N/A N/A self hasMove birth N/A N/A compList N/A N/A N/A self LapsSinceLastBirth keys N/A newDict N/A defaultdict int N/A kk compList N/A N/A N/A kk kA N/A N/A N/A newDict N/A kA N/A N/A np maximum N/A N/A self LapsSinceLastBirth N/A kA N/A N/A self LapsSinceLastBirth N/A kB N/A N/A N/A kk kB N/A N/A N/A newDict N/A kk N/A N/A self LapsSinceLastBirth N/A kk N/A N/A N/A kk kB N/A N/A N/A newDict N/A N/A kk 1 N/A N/A self LapsSinceLastBirth N/A kk N/A N/A self LapsSinceLastBirth newDict N/A N/A N/A SS hasMergeTerms N/A N/A N/A N/A SS setMergeFieldsToZero N/A N/A hmodel SS evBound N/A N/A