Module Expr Str ImportFrom alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias Assign NameStore AttributeLoad NameLoad attr ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore Dict FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index Str Return AttributeLoad NameLoad attr decorator_list Assign NameStore BinOpMod Str Call NameLoad Str Expr Str FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Assign NameStore Dict Str SubscriptLoad AttributeLoad NameLoad attr Index Str orelse Assign NameStore Dict Str NameLoad Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Dict Str AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Assign NameStore Call NameLoad Str orelse Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Dict Str BinOpMult SubscriptLoad AttributeLoad NameLoad attr Index Str Num Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str TryExcept body Assign TupleStore NameStore NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad handlers ExceptHandler body Return NameLoad Assign NameStore NameLoad If CompareEq NameLoad Str body Assign NameStore NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIn Str NameLoad body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str orelse TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler body Pass orelse If BoolOpAnd CompareEq NameLoad Str UnaryOpNot CompareIs NameLoad NameLoad body Assign NameStore NameLoad If Call AttributeLoad NameLoad attr Str body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad If CompareGt Call AttributeLoad NameLoad attr Num body Assign NameStore IfExp NameLoad AttributeLoad SubscriptLoad NameLoad Index Num attr UnaryOpUSub AttributeLoad SubscriptLoad NameLoad Index Num attr Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore ListLoad If CompareIn Str NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Str If AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr body Return orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Return Assign NameStore Num Assign NameStore Num For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr Num body Continue If AttributeLoad AttributeLoad NameLoad attr attr body Continue If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num body Continue Assign NameStore Call NameLoad BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BinOpMult BinOpMult Num NameLoad NameLoad AugAssignAdd NameStore BinOpDiv NameLoad AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr Dict Str IfExp CompareGt NameLoad Num BinOpDiv NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr orelse Return Call NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Num FunctionDef arguments args NameParam defaults kwarg body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad If CompareIn Str NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Str If AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr body Return orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Return Assign NameStore Num Assign NameStore Num For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr Num body Continue If AttributeLoad AttributeLoad NameLoad attr attr body Continue Assign NameStore Call NameLoad Lambda arguments args NameParam defaults Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Call NameLoad SubscriptLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMult BinOpMult NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AugAssignAdd NameStore BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd NameStore Num TryExcept body Assign AttributeStore NameLoad attr Dict Str IfExp CompareGt NameLoad Num BinOpDiv NameLoad NameLoad Num handlers ExceptHandler body Assign AttributeStore NameLoad attr Dict Str Call NameLoad Str decorator_list ClassDef bases body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq Call NameLoad NameLoad Num body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num Assign AttributeStore NameLoad attr Num orelse If CompareEq Call NameLoad NameLoad Num body Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr BinOpDiv AttributeLoad NameLoad attr Num orelse If CompareEq Call NameLoad NameLoad Num body TryExcept body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr BinOpDiv AttributeLoad NameLoad attr Num Return If BoolOpAnd CompareEq Call NameLoad BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Num CompareEq Call NameLoad BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Assign AttributeStore NameLoad attr BinOpDiv BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Num Assign AttributeStore NameLoad attr BinOpDiv BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Num Assign NameStore Call NameLoad ListLoad NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return Assign NameStore BinOpDiv BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpDiv BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr BinOpDiv BinOpSub BinOpAdd BinOpMult BinOpMult NameLoad NameLoad BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num BinOpMult NameLoad BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num BinOpMult NameLoad BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num BinOpMult Num BinOpSub NameLoad NameLoad Assign AttributeStore NameLoad attr BinOpAdd BinOpDiv BinOpMult Num BinOpSub AttributeLoad NameLoad attr BinOpDiv BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Num NameLoad BinOpDiv BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Return TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Return TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Return TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Return TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Return TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Return TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num If BoolOpAnd CompareEq Call NameLoad NameLoad Num CompareEq Call NameLoad NameLoad Num body Return NameLoad orelse If CompareEq Call NameLoad NameLoad Num body Return NameLoad orelse If CompareEq Call NameLoad NameLoad Num body Return NameLoad orelse If CompareEq Call NameLoad NameLoad Num body Return NameLoad orelse If CompareEq Call NameLoad NameLoad Num body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad ListLoad NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return CompareLtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad ListLoad NameLoad NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If BoolOpAnd CompareEq NameLoad Num CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr ListLoad SubscriptLoad NameLoad Index Num orelse If BoolOpAnd CompareEq NameLoad Num CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr ListLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse If BoolOpAnd CompareEq NameLoad Num CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Num orelse If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse AugAssignAdd AttributeStore NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpSub NameLoad Num NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index BinOpSub NameLoad Num body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index BinOpSub NameLoad Num AugAssignAdd AttributeStore NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpSub NameLoad Num NameLoad BinOpAdd NameLoad Num AugAssignSub AttributeStore NameLoad attr Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr orelse Return Call NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore ListLoad If CompareIn Str NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Str If AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr body Return orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Return Assign NameStore Num Assign NameStore Num For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr Num body Continue If AttributeLoad AttributeLoad NameLoad attr attr body Continue Assign NameStore Num For NameStore AttributeLoad NameLoad attr body For NameStore NameLoad body AugAssignAdd NameStore AttributeLoad NameLoad attr AugAssignAdd NameStore BinOpDiv BinOpDiv BinOpMult BinOpMult Num NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr Dict Str BinOpDiv NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr orelse Return Call NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore ListLoad If CompareIn Str NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Str If AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr body Return orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Return Assign NameStore Num Assign NameStore Num For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr Num body Continue If AttributeLoad AttributeLoad NameLoad attr attr body Continue Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore BinOpDiv BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If CompareGt NameLoad Num body Assign NameStore BinOpDiv Num NameLoad AugAssignAdd NameStore NameLoad AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr Dict Str IfExp CompareGt NameLoad Num BinOpDiv NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr orelse Return Call NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore ListLoad If CompareIn Str NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Str orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr Dict Str Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpAdd NameLoad NameLoad NameLoad Return orelse Return Assign NameStore Num For NameStore NameLoad body Assign NameStore Num While CompareIn BinOpMod Str NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad NameLoad If UnaryOpNot CompareIs NameLoad NameLoad body AugAssignAdd NameStore NameLoad AugAssignAdd NameStore Num If CompareIsNot Call AttributeLoad NameLoad attr Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Dict Str BinOpMod Str TupleLoad NameLoad NameLoad orelse Assign AttributeStore NameLoad attr Dict Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr Str Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore NameLoad If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Num Assign NameStore Num For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr Num body Continue Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Continue AugAssignAdd NameStore NameLoad AugAssignAdd NameStore NameLoad orelse Return If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad CompareEq NameLoad Num body Return TryExcept body Assign AttributeStore NameLoad attr Dict Str BinOpDiv NameLoad NameLoad handlers ExceptHandler body If CompareEq SubscriptLoad NameLoad Index Str Num body Assign AttributeStore NameLoad attr Dict Str Num orelse Assign AttributeStore NameLoad attr Dict Str BinOpDiv NameLoad SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore ListLoad If CompareIn Str NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Str orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Return Assign NameStore Num For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Continue If CompareGt Call NameLoad NameLoad Call NameLoad NameLoad body AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr Dict Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore NameLoad If CompareIn Str NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Str orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Return Assign NameStore Num If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore CompareEq Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num Num orelse Assign NameStore NameLoad For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr Num body Continue Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If BoolOpAnd NameLoad CompareGt AttributeLoad NameLoad attr Num body Assign NameStore BinOpDiv Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Continue If BoolOpAnd CompareGt Call NameLoad NameLoad Call NameLoad NameLoad CompareLt Call NameLoad NameLoad Call NameLoad NameLoad body AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr Dict Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore ListLoad If CompareIn Str NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Str orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Return If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore CompareEq Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num Num orelse Assign NameStore NameLoad Assign NameStore Num For NameStore NameLoad body If BoolOpAnd CompareEq Call NameLoad AttributeLoad NameLoad attr Num CompareNotEq AttributeLoad NameLoad attr Num body AugAssignAdd NameStore Num orelse If CompareEq AttributeLoad NameLoad attr Num body If CompareIn Str NameLoad body Continue orelse If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body AugAssignAdd NameStore Num Continue If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body AugAssignAdd NameStore Num Continue Assign NameStore Call AttributeLoad NameLoad attr If BoolOpOr NameLoad CompareGt Call NameLoad NameLoad Num body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore NameLoad While CompareGt Call NameLoad NameLoad Num body If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Continue Assign NameStore NameLoad For NameStore NameLoad body Assign NameStore NameLoad If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr NameLoad body Assign NameStore NameLoad orelse For NameStore NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If BoolOpOr BoolOpAnd Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad BoolOpAnd Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Break If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad If UnaryOpNot NameLoad body Assign NameStore NameLoad Break If NameLoad body AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr Dict Str NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotEq NameLoad NameLoad body Assign AttributeStore NameLoad attr Dict Str BinOpMod Call NameLoad Str Dict Str Str NameLoad NameLoad handlers ExceptHandler body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body If CompareEq Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad body If CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str Num body Return Str orelse Return Str orelse Return Call AttributeLoad NameLoad attr NameLoad Return BinOpMod Str AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If UnaryOpNot CompareIn Str NameLoad body Return Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Str CompareEq BinOpSub Call NameLoad NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If UnaryOpNot CompareIn Str NameLoad body Return Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpSub Call NameLoad NameLoad AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotEq NameLoad NameLoad body Assign AttributeStore NameLoad attr Dict Str BinOpMod Call NameLoad Str Dict Str Str NameLoad NameLoad handlers ExceptHandler body Assign AttributeStore NameLoad attr Dict Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr Str If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore CompareEq Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num Num orelse Assign NameStore NameLoad If CompareIn Str NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Str Assign NameStore Num While CompareIn BinOpMod Str NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad BinOpMult NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpSub NameLoad BinOpMult NameLoad NameLoad AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareEq NameLoad NameLoad body Return If BoolOpAnd NameLoad CompareGt AttributeLoad NameLoad attr Num body Assign NameStore BinOpDiv NameLoad AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad NameLoad body If CompareLt NameLoad NameLoad body Assign AttributeStore NameLoad attr Dict Str Str Str NameLoad NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num Return Assign AttributeStore NameLoad attr Dict Str Str Str Call NameLoad NameLoad NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num Return orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Num Assign NameStore NameLoad While CompareIn BinOpMod Str NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If BoolOpOr UnaryOpNot NameLoad CompareLt NameLoad NameLoad body Assign NameStore NameLoad AugAssignAdd NameStore Num Assign NameStore BinOpAdd NameLoad BinOpMult NameLoad NameLoad Assign NameStore BinOpSub NameLoad BinOpMult NameLoad NameLoad Assign NameStore Num For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If BoolOpAnd NameLoad CompareGt AttributeLoad NameLoad attr Num body Assign NameStore BinOpDiv Call NameLoad NameLoad AttributeLoad NameLoad attr If BoolOpAnd CompareNotEq NameLoad NameLoad CompareGtE NameLoad NameLoad CompareLt NameLoad NameLoad body AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr Dict Str NameLoad orelse Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body If BoolOpAnd CompareIn Str AttributeLoad NameLoad attr CompareIn Str AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore IfExp CompareGtE NameLoad Num BinOpMod Str NameLoad Str Assign NameStore Str Assign NameStore Dict Str NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If BoolOpOr CompareIn Str NameLoad UnaryOpNot CompareIn Str NameLoad body Return Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If CompareEq Call NameLoad NameLoad Num body Return If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore CompareEq Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num Num orelse Assign NameStore NameLoad Assign NameStore Num Assign NameStore Num For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr Num body Continue Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If BoolOpAnd NameLoad CompareGt AttributeLoad NameLoad attr Num body Assign NameStore BinOpDiv Call NameLoad NameLoad AttributeLoad NameLoad attr If UnaryOpNot CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Dict Str BinOpSub NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr Str Return Call NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Return Assign NameStore Num Assign NameStore Num For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Continue Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpAnd CompareEq NameLoad Num CompareEq NameLoad Num body Continue Assign NameStore BinOpDiv NameLoad BinOpAdd NameLoad NameLoad If CompareGt NameLoad Num body AugAssignAdd NameStore Num orelse Assign NameStore BinOpDiv NameLoad BinOpAdd NameLoad NameLoad If CompareGt NameLoad Num body AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr Dict Str BinOpSub NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore IfExp CompareGt SubscriptLoad AttributeLoad NameLoad attr Index Str Num Call NameLoad Str Call NameLoad Str If CompareEq NameLoad Num body Return BinOpMod Str Call NameLoad Str orelse Return BinOpMod Str TupleLoad NameLoad NameLoad Return BinOpMod Str Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore IfExp CompareGt SubscriptLoad AttributeLoad NameLoad attr Index Str Num Call NameLoad Str Call NameLoad Str Assign NameStore Dict Str BinOpMod Str TupleLoad NameLoad NameLoad orelse Assign NameStore Dict Str NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Return Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Return Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If UnaryOpNot CompareIn Str NameLoad body Return Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad TryExcept body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Assign NameStore BinOpSub Num NameLoad Assign NameStore BinOpAdd Num NameLoad handlers ExceptHandler body Assign NameStore Num Assign NameStore Num Assign NameStore Num For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr Num body Continue Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Continue Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpAnd CompareEq NameLoad Num CompareEq NameLoad Num body Continue Assign NameStore BinOpDiv NameLoad BinOpAdd NameLoad NameLoad If BoolOpAnd CompareGt NameLoad NameLoad CompareLt NameLoad NameLoad body AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr Dict Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If BoolOpOr UnaryOpNot CompareIn Str NameLoad UnaryOpNot CompareIn Str AttributeLoad NameLoad attr body Return Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Dict Str CompareEq BinOpSub Call NameLoad NameLoad Num NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If UnaryOpNot CompareIn Str NameLoad body Return Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot NameLoad body Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Dict Str CompareEq Call NameLoad NameLoad Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If UnaryOpNot CompareIn Str NameLoad body Return Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotEq NameLoad NameLoad body Assign AttributeStore NameLoad attr Dict Str CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str BinOpSub Call NameLoad NameLoad Num orelse If CompareNotEq NameLoad NameLoad body Assign AttributeStore NameLoad attr Dict Str BinOpMod Call NameLoad Str Dict Str Str SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad orelse Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If UnaryOpNot CompareIn Str NameLoad body Return Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore CompareEq Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num Num orelse Assign NameStore NameLoad Assign NameStore Num For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareIs NameLoad NameLoad body Continue Assign NameStore Call NameLoad NameLoad Assign NameStore Num Assign NameStore NameLoad While CompareIn BinOpMod Str NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad NameLoad AugAssignAdd NameStore Num If CompareIs NameLoad NameLoad body Continue Assign NameStore Call NameLoad NameLoad TryExcept body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str NameLoad handlers ExceptHandler body Assign NameStore Num If BoolOpAnd CompareNotEq NameLoad Num CompareGt BinOpDiv NameLoad NameLoad NameLoad body Assign NameStore NameLoad Break If NameLoad body If NameLoad body AugAssignAdd NameStore AttributeLoad NameLoad attr orelse AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr Dict Str NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotEq NameLoad NameLoad body Assign AttributeStore NameLoad attr Dict Str CompareGtE NameLoad Call NameLoad NameLoad orelse If CompareNotEq NameLoad NameLoad body Assign AttributeStore NameLoad attr Dict Str BinOpMod Call NameLoad Str Dict Str Str NameLoad NameLoad handlers ExceptHandler body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign AttributeStore NameLoad attr Dict Str NameLoad If UnaryOpNot CompareIn Str NameLoad body Return Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore Num For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr Num body Continue AugAssignAdd NameStore AttributeLoad NameLoad attr If CompareGt AttributeLoad NameLoad attr Num body AugAssignAdd NameStore Num If BoolOpOr CompareLt AttributeLoad NameLoad attr NameLoad CompareGt AttributeLoad NameLoad attr NameLoad body Return If BoolOpOr CompareLt NameLoad NameLoad CompareGt NameLoad NameLoad body Return If BoolOpOr CompareLt NameLoad NameLoad CompareGt NameLoad NameLoad body Return Assign AttributeStore NameLoad attr Dict Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore ListLoad If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad Lambda arguments args NameParam defaults UnaryOpNot CompareIs NameLoad NameLoad NameLoad If CompareEq Call NameLoad NameLoad Num body Return Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpAdd NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Dict Str BinOpDiv NameLoad Call NameLoad NameLoad orelse If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Return If UnaryOpNot CompareIn Str NameLoad body Assign NameStore Num Assign NameStore Num For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr Num body Continue AugAssignAdd NameStore Num Assign NameStore Num Assign NameStore Num While CompareIn BinOpMod Str TupleLoad BinOpAdd NameLoad Num AttributeLoad NameLoad attr body AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad NameLoad If UnaryOpNot CompareIs NameLoad NameLoad body AugAssignAdd NameStore Call NameLoad NameLoad AugAssignAdd NameStore BinOpDiv NameLoad NameLoad If CompareEq NameLoad Num body Assign AttributeStore NameLoad attr NameLoad Return Assign AttributeStore NameLoad attr Dict Str BinOpDiv NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body If CompareEq Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad body Return Call AttributeLoad NameLoad attr keyword NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If UnaryOpNot CompareIn Str NameLoad body Return Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad Lambda arguments args NameParam defaults CompareEq SubscriptLoad AttributeLoad NameLoad attr Slice Num Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad Lambda arguments args NameParam defaults SubscriptLoad AttributeLoad NameLoad attr Slice Num NameLoad Assign AttributeStore NameLoad attr Dict Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str orelse Return Assign NameStore NameLoad If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr Dict Str Call NameLoad Str If CompareIn Str NameLoad body TryExcept body Assign AttributeStore NameLoad attr Dict Str Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str keyword NameLoad handlers ExceptHandler body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If UnaryOpNot CompareIn Str NameLoad body Return Assign NameStore SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore AttributeLoad NameLoad attr If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If UnaryOpNot CompareIn Str NameLoad body Assign AttributeStore NameLoad attr Dict Str Str Return Assign NameStore SubscriptLoad NameLoad Index Str If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore BinOpAdd Str NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore NameLoad For NameStore NameLoad body If AttributeLoad NameLoad attr body Continue Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore BinOpBitAnd NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam defaults Call NameLoad AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Str CompareIn NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If UnaryOpNot CompareIn Str NameLoad body Return Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore CompareEq Call AttributeLoad NameLoad attr Str Num Assign NameStore CompareEq Call AttributeLoad NameLoad attr Str Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Dict Str Str IfExp NameLoad Call NameLoad SubscriptLoad NameLoad Index Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str If SubscriptLoad AttributeLoad NameLoad attr Index Str body Return BinOpMod Str NameLoad Assign NameStore Call NameLoad Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Num comprehension NameStore SubscriptLoad NameLoad Index Str If SubscriptLoad NameLoad Index Str body Assign NameStore BinOpMod Str Call NameLoad Str orelse Assign NameStore BinOpMod Str Call NameLoad Str AugAssignAdd NameStore BinOpMod NameLoad Dict Str Str Str IfExp SubscriptLoad NameLoad Index Str Str Str SubscriptLoad NameLoad Index Str NameLoad AugAssignAdd NameStore BinOpMod Str TupleLoad Call NameLoad Str Call NameLoad SubscriptLoad NameLoad Index Str AugAssignAdd NameStore BinOpMod Str TupleLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr IfExp SubscriptLoad NameLoad Index Str Call AttributeLoad SubscriptLoad NameLoad Index Str attr Call AttributeLoad SubscriptLoad NameLoad Index Str attr For NameStore SubscriptLoad NameLoad Index Str body AugAssignAdd NameStore BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str AugAssignAdd NameStore Str AugAssignAdd NameStore Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str If UnaryOpNot CompareIn Str NameLoad body Return Assign NameStore SubscriptLoad NameLoad Index Str If AttributeLoad AttributeLoad NameLoad attr attr body Return Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore ListLoad If CompareIn Str NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Str If AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr body Return orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Return Assign NameStore Num Assign NameStore Num For NameStore NameLoad body If BoolOpOr AttributeLoad AttributeLoad NameLoad attr attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num CompareEq AttributeLoad NameLoad attr Num body Continue AugAssignAdd NameStore BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr Dict Str IfExp CompareGt NameLoad Num BinOpDiv NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr orelse Return Call NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body FunctionDef arguments args NameParam defaults body Return Call NameLoad Call NameLoad Lambda arguments args NameParam defaults IfExp NameLoad Call NameLoad NameLoad Num Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Assign NameStore ListComp SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore ListLoad Assign NameStore Num Assign NameStore Num For TupleStore NameStore NameStore Call NameLoad NameLoad body AugAssignAdd NameStore Num If BoolOpAnd CompareEq BinOpMod NameLoad Num Num CompareGt NameLoad Num body AugAssignAdd NameStore Call NameLoad NameLoad Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Dict Str Str SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num AugAssignAdd NameStore Call NameLoad NameLoad If CompareEq NameLoad Num body Return Num Return BinOpDiv NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore ListLoad If CompareIn Str NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Str If AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr body Return orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore IfExp CompareIn Str NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num If CompareEq Call NameLoad NameLoad Num body Assign NameStore IfExp CompareEq AttributeLoad SubscriptLoad NameLoad Index Num attr Num Num Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num orelse If CompareGt Call NameLoad NameLoad Num body Assign NameStore ListLoad For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr Num body Continue Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad AttributeLoad AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr attr attr Assign NameStore Call NameLoad Dict Str NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body Assign NameStore BinOpPow BinOpSub NameLoad BinOpDiv NameLoad NameLoad Num Assign NameStore BinOpPow BinOpDiv NameLoad NameLoad Num AugAssignAdd NameStore BinOpDiv NameLoad NameLoad Assign AttributeStore NameLoad attr Dict Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot CompareIs AttributeLoad NameLoad attr NameLoad CompareIn Str AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Dict Str SubscriptLoad AttributeLoad NameLoad attr Index Str Return Call AttributeLoad NameLoad attr NameLoad orelse Return Call NameLoad Str decorator_list decorator_list
N/A N/A 
Define the calculators used for scoring in the redistricting app.

The classes in redistricting.calculators define the scoring
calculators used in the application. Each class relates to
one type of calculator that can be referenced within the config
file to define how to score a plan or district.

This file is part of The Public Mapping Project
https://github.com/PublicMapping/

License:
    Copyright 2010-2012 Micah Altman, Michael McDonald

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

Author: 
    Andrew Jennings, David Zwarg, Kenny Shepard
 math sqrt pi django.contrib.gis.geos Point LineString django.contrib.humanize.templatetags.humanize intcomma django.utils simplejson json django.utils.translation ugettext _ django.template Template Context decimal Decimal copy copy N/A random django.db.models Q N/A operator N/A itertools N/A redis django.conf settings redisutils key_gen N/A redis_settings N/A settings KEY_VALUE_STORE CalculatorBase N/A object N/A N/A 
    The base class for all calculators. CalculatorBase defines the result 
    object and a couple default rendering options for HTML and JSON.
     N/A result None N/A arg_dict N/A __init__ N/A N/A self N/A N/A N/A 
        Initialize the result and argument dictionary.
         N/A N/A self result None N/A N/A self arg_dict N/A N/A compute N/A N/A self N/A kwargs N/A N/A 
        Compute the value for this calculator. The base class calculates
        nothing.
         N/A N/A sortkey N/A N/A self N/A N/A N/A 
        Generate a key used to sort this calculator relative to all other
        calculators. The default sorting method sorts by the value of 
        the result.

        @return: The value of the result.
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A self result N/A value N/A N/A self result N/A html N/A N/A self N/A N/A N/A 
        Generate a basic HTML representation of the result.

        The base calculator generates an HTML span element, with the text
        content set to a string representation of the result. If the result
        is None, the string "n/a" is used. If 'raw' is defined, the value
        of raw is used (for fine-grained control using templates).

        @return: An HTML SPAN element, formatted similar to: "<span>n/a</span>".
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A self template <span>{{ result.value }}</span> N/A N/A N/A N/A N/A self result None N/A raw N/A self result N/A N/A N/A N/A self result N/A raw N/A N/A self empty_html_result N/A N/A empty_html_result N/A <span>%s</span> N/A _ n/a N/A 
    In case of an empty result, return a span with the properly 
    localized version of 'n/a'
     json N/A N/A self N/A N/A N/A 
        Generate a basic JSON representation of the result.

        The base calculator generates an simple Javascript object that 
        contains a single property, named "result".

        @return: A JSON string with a single object that contains the
            property 'result'.
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A output N/A result N/A N/A self result N/A value N/A N/A output N/A result None N/A N/A N/A json dumps output use_decimal True N/A template N/A N/A self template context N/A None N/A N/A 
        Generate a representation of the score using the django
        templating system and the calculator's result. Required 
        for localizing number formats.

        @param template: A string that may use django template tags
        @param context: A dict object representing additional context
            to be used when rendering the template. The "result" of
            the calculator is always available.

        @return: A string representing the rendering template and context
         N/A t N/A Template template N/A c N/A Context N/A result N/A self result N/A N/A context None N/A N/A N/A N/A c update context N/A N/A N/A t render c N/A percentage N/A N/A self span N/A False N/A N/A 
        Return the calculator's result value as a properly localized
        percentage

        @return: A string representing the result as a percentage
         N/A span N/A N/A t N/A Template <span>{{ percentage|floatformat:2 }}%</span> N/A N/A t N/A Template {{ percentage|floatformat:2 }}% N/A c N/A Context N/A percentage N/A N/A N/A self result N/A value 100 N/A N/A N/A t render c N/A get_value N/A N/A self argument district N/A None N/A N/A 
        Get the value of an argument if it is a literal or a subject.

        This method is used anytime a calculator needs to get the value of
        a named argument. The type of the argument is determined from the 
        tuple in the argument dictionary, and either the literal value or
        the retrieved ComputedCharacteristic is returned. This only searches
        for the ComputedCharacteristic in the set attached to the district.

        If no district is provided, no subject argument value is ever 
        returned.

        @param argument: The name of the argument passed to the calculator.
        @param district: An optional district, used to fetch related 
            ComputedCharacteristics.

        @return: The value of the subject or literal argument.
         N/A N/A N/A N/A argtype argval N/A N/A self arg_dict N/A argument N/A N/A N/A N/A None N/A value None N/A N/A argtype literal N/A N/A value argval N/A N/A N/A isinstance argval dict N/A value argval N/A N/A value N/A Decimal N/A argval N/A value N/A N/A N/A N/A value N/A Decimal value N/A N/A N/A N/A N/A N/A N/A N/A argtype subject N/A N/A district None N/A N/A add_subject True N/A N/A N/A argval startswith - N/A N/A add_subject False N/A argval N/A argval N/A 1 N/A cc N/A N/A N/A district computedcharacteristic_set filter subject__name argval N/A N/A N/A N/A cc count 0 N/A N/A value N/A add_subject N/A N/A cc N/A 0 number N/A N/A N/A cc N/A 0 number N/A value N/A N/A Schwartzberg N/A CalculatorBase N/A N/A 
    Calculator for the Schwartzberg measure of compactness.
        
    The Schwartzberg measure of compactness measures the perimeter of 
    the district to the circumference of the circle whose area is 
    equal to the area of the district. The algorithm here computes the
    inverse Schwartberg compactness measure, suitable for display as a 
    percentage, with a higher percentage indicating a more compact 
    district.

    This calculator will calculate either the compactness score of a
    single district, or it will average the compactness scores of all 
    districts in a plan.
     compute N/A N/A self N/A kwargs N/A N/A 
        Calculate the Schwartzberg measure of compactness.

        @keyword district: A L{District} whose compactness should be 
            computed.
        @keyword plan: A L{Plan} whose district compactnesses should be 
            averaged.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A districts N/A N/A N/A district kwargs N/A N/A districts N/A N/A kwargs N/A district N/A N/A N/A N/A districts N/A 0 geom empty N/A N/A N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom True N/A N/A N/A num 0 N/A compactness 0 N/A district districts N/A N/A N/A N/A district district_id 0 N/A N/A N/A N/A N/A district geom empty N/A N/A N/A N/A N/A N/A district geom length 0 N/A N/A N/A r N/A sqrt N/A N/A N/A district geom area pi N/A circumference N/A N/A 2 pi r N/A compactness N/A circumference N/A N/A district geom length N/A num 1 N/A N/A self result N/A value N/A N/A num 0 N/A compactness num 0 N/A html N/A N/A self N/A N/A N/A 
        Generate an HTML representation of the compactness score. This
        is represented as a percentage or "n/a"

        @return: A number formatted similar to "1.00%", or "n/a"
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A self percentage N/A N/A N/A _ n/a N/A N/A Roeck N/A CalculatorBase N/A N/A 
    Calculator for the Roeck measure of compactness.

    The Roeck measure of compactness measures the area of the smallest
    enclosing circle around a district compared to the area of the district.

    This calculator will calculate either the compactness score of a single
    district, or it will average the compactness scores of all districts
    in a plan.
     N/A rec 0 compute N/A N/A self N/A kwargs N/A N/A 
        Calculate the Roeck measure of compactness.

        @keyword district: A L{District} whose compactness should be 
            computed.
        @keyword plan: A L{Plan} whose district compactnesses should be 
            averaged.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A N/A N/A random seed N/A districts N/A N/A N/A district kwargs N/A N/A districts N/A N/A kwargs N/A district N/A N/A N/A N/A districts N/A 0 geom empty N/A N/A N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom True N/A N/A N/A num 0 N/A compactness 0 N/A district districts N/A N/A N/A N/A district district_id 0 N/A N/A N/A N/A N/A district geom empty N/A N/A N/A hull N/A map N/A N/A N/A x N/A N/A Point N/A x N/A 0 N/A x N/A 1 N/A list N/A N/A N/A N/A district geom convex_hull coords N/A 0 N/A disk N/A N/A self minidisk hull N/A cir_area N/A N/A pi N/A disk r N/A disk r N/A compactness N/A N/A N/A district geom area cir_area N/A num 1 N/A N/A N/A N/A self result N/A value N/A N/A num 0 N/A compactness num 0 N/A N/A N/A N/A N/A self result N/A value N/A _ n/a N/A Circle N/A N/A N/A 
        Helper class for the Roeck calculator. A Circle class can create circles based
        on 1, 2, or 3 coordinates. A circle has a center and a radius. A circle also
        can test if another point lies within the area of itself.
         N/A cx None N/A cy None N/A r None __init__ N/A N/A self pts N/A N/A N/A 
            Create a new Circle helper. Constructing a Circle with one coordinate
            creates a 0 diameter circle, centered on the coordinate. Constructing
            a Circle with two coordinates creates a circle positioned between the
            two coordinates, with the diameter set to the distance between the
            points. Constructing a Circle with three coordinates creates a circle
            that passes through all three points.

            @param pts: A set of points that lay on the perimeter of this circle.

            @return: A calculated Circle that contains the coordinates.
             N/A N/A N/A len pts 1 N/A N/A N/A self cx N/A N/A N/A pts N/A 0 coords N/A 0 N/A N/A self cy N/A N/A N/A pts N/A 0 coords N/A 1 N/A N/A self r 0 N/A N/A N/A N/A len pts 2 N/A N/A ls N/A LineString pts N/A N/A self cx N/A N/A ls centroid x N/A N/A self cy N/A N/A ls centroid y N/A N/A self r N/A N/A ls length 2 N/A N/A N/A N/A len pts 3 N/A N/A N/A N/A N/A p1 p2 p3 N/A N/A self deperpendicularize pts N/A N/A N/A ValueError N/A N/A ls N/A LineString pts N/A N/A self cx N/A N/A ls centroid x N/A N/A self cy N/A N/A ls centroid y N/A N/A self r N/A N/A ls length 2 N/A N/A N/A N/A N/A abs N/A N/A N/A p2 coords N/A 0 N/A N/A p1 coords N/A 0 0 N/A N/A abs N/A N/A N/A p3 coords N/A 1 N/A N/A p2 coords N/A 1 0 N/A N/A N/A self cx N/A N/A N/A N/A p2 coords N/A 0 N/A N/A p3 coords N/A 0 2 N/A N/A self cy N/A N/A N/A N/A p1 coords N/A 1 N/A N/A p2 coords N/A 1 2 N/A ls N/A LineString N/A p1 N/A Point N/A self cx N/A self cy N/A N/A self r N/A ls length N/A N/A m1 N/A N/A N/A N/A p2 coords N/A 1 N/A N/A p1 coords N/A 1 N/A N/A N/A p2 coords N/A 0 N/A N/A p1 coords N/A 0 N/A m2 N/A N/A N/A N/A p3 coords N/A 1 N/A N/A p2 coords N/A 1 N/A N/A N/A p3 coords N/A 0 N/A N/A p2 coords N/A 0 N/A N/A self cx N/A N/A N/A N/A N/A m1 m2 N/A N/A N/A p1 coords N/A 1 N/A N/A p3 coords N/A 1 N/A m2 N/A N/A N/A p1 coords N/A 0 N/A N/A p2 coords N/A 0 N/A m1 N/A N/A N/A p2 coords N/A 0 N/A N/A p3 coords N/A 0 N/A 2 N/A m2 m1 N/A N/A self cy N/A N/A N/A -1 N/A N/A self cx N/A N/A N/A N/A p1 coords N/A 0 N/A N/A p2 coords N/A 0 2.0 m1 N/A N/A N/A N/A p1 coords N/A 1 N/A N/A p2 coords N/A 1 2.0 N/A lsR N/A LineString N/A pts N/A 0 N/A N/A self cx N/A self cy N/A N/A self r N/A lsR length N/A N/A N/A self cx None N/A N/A self cy None N/A N/A self r None N/A deperpendicularize N/A N/A self pts N/A N/A N/A 
            Reorder coordinates to ensure that they are not perpendicular
            in a way that may cause divide by zero exceptions. This tests
            all 6 permutations of the point set, testing it with the
            isperpendicular method.

            @params pts: A set of points, passed in as an array
            @return: A 3 element tuple with the reordered points.
             N/A N/A N/A N/A self isperpendicular N/A pts N/A 0 N/A pts N/A 1 N/A pts N/A 2 N/A N/A N/A N/A pts N/A 0 N/A pts N/A 1 N/A pts N/A 2 N/A N/A N/A N/A self isperpendicular N/A pts N/A 0 N/A pts N/A 2 N/A pts N/A 1 N/A N/A N/A N/A pts N/A 0 N/A pts N/A 2 N/A pts N/A 1 N/A N/A N/A N/A self isperpendicular N/A pts N/A 1 N/A pts N/A 0 N/A pts N/A 2 N/A N/A N/A N/A pts N/A 1 N/A pts N/A 0 N/A pts N/A 2 N/A N/A N/A N/A self isperpendicular N/A pts N/A 1 N/A pts N/A 2 N/A pts N/A 0 N/A N/A N/A N/A pts N/A 1 N/A pts N/A 2 N/A pts N/A 0 N/A N/A N/A N/A self isperpendicular N/A pts N/A 2 N/A pts N/A 1 N/A pts N/A 0 N/A N/A N/A N/A pts N/A 2 N/A pts N/A 1 N/A pts N/A 0 N/A N/A N/A N/A self isperpendicular N/A pts N/A 2 N/A pts N/A 0 N/A pts N/A 1 N/A N/A N/A N/A pts N/A 2 N/A pts N/A 0 N/A pts N/A 1 N/A N/A ValueError All combinations are perpendicular. N/A isperpendicular N/A N/A self pt1 pt2 pt3 N/A N/A N/A 
            Test a set of points to see if they are perpendicular.
            Points are deemed perpendicular if they describe two 
            different lines that are parallel to the X and Y axes.

            @param pt1: The first point to test.
            @param pt2: The second point to test.
            @param pt3: The third point to test.

            @return: A boolean flag indicating if the points describe
            a set of perpendicular lines that are parallel with the 
            X and Y axes.
             N/A dy1 N/A N/A N/A pt2 coords N/A 1 N/A N/A pt1 coords N/A 1 N/A dx1 N/A N/A N/A pt2 coords N/A 0 N/A N/A pt1 coords N/A 0 N/A dy2 N/A N/A N/A pt3 coords N/A 1 N/A N/A pt2 coords N/A 1 N/A dx2 N/A N/A N/A pt3 coords N/A 0 N/A N/A pt2 coords N/A 0 N/A N/A N/A N/A abs dx1 0 N/A N/A abs dy2 0 N/A N/A False N/A N/A N/A N/A abs dy1 0 N/A N/A True N/A N/A N/A N/A abs dy2 0 N/A N/A True N/A N/A N/A N/A abs dx1 0 N/A N/A True N/A N/A N/A N/A abs dx2 0 N/A N/A True N/A False N/A contains N/A N/A self pt N/A N/A N/A 
            Does this circle contain a specified point.

            @param: pt The specified point
            @return: A boolean flag indicating if the specified point lies
                     within the area of the Circle.
             N/A ls N/A LineString N/A pt N/A Point N/A self cx N/A self cy N/A N/A N/A ls length N/A self r N/A N/A minidisk N/A N/A self points N/A N/A N/A 
        A recursive minimum enclosing disk algorithm. Based on E. Welzl, 
        "Smallest enclosing disks (balls and ellipsoids)", 1991.

        This code borrows some patterns from the applet source here:
        http://www.sunshine2k.de/stuff/Java/Welzl/Welzl.html

        @param points: An array of points, from a GEOSGeometry.
        @return: A L{Roeck.Circle} minimum enclosing disk for the points.
         N/A N/A self rec 0 N/A shuffled N/A copy N/A points N/A 1 N/A N/A N/A random shuffle shuffled N/A N/A N/A self b_minidisk shuffled N/A len shuffled N/A None None None 0 N/A b_minidisk N/A N/A self points npts boundary nbnd N/A N/A N/A 
        A recursive minimum enclosing disk algorithm. Based on E. Welzl,
        "Smallest enclosing disks (balls and ellipsoids)", 1991.

        This code borrows some patterns from the applet source here:
        http://www.sunshine2k.de/stuff/Java/Welzl/Welzl.html

        @param points: A random array of non-duplicating points.
        @param npts: The position in the point array for searching.
        @param boundary: The farthest outliers on or in the smallest disk.
        @param nbnd: The index of the boundary list for the next boundary point.
        @return: A L{Roeck.Circle} minimum enclosing disk for the points.
         N/A N/A N/A npts 1 N/A nbnd 0 N/A N/A disk N/A N/A Roeck Circle N/A N/A points N/A 0 N/A N/A N/A N/A npts 1 N/A nbnd 1 N/A N/A disk N/A N/A Roeck Circle N/A N/A points N/A 0 N/A boundary N/A 0 N/A N/A N/A N/A npts 0 N/A nbnd 2 N/A N/A disk N/A N/A Roeck Circle N/A boundary N/A 0 2 N/A N/A N/A nbnd 3 N/A N/A disk N/A N/A Roeck Circle boundary N/A N/A N/A self rec 1 N/A disk N/A N/A self b_minidisk points N/A npts 1 boundary nbnd N/A N/A N/A N/A disk contains N/A points N/A N/A npts 1 N/A N/A N/A boundary N/A nbnd N/A points N/A N/A npts 1 N/A N/A self rec 1 N/A disk N/A N/A self b_minidisk points N/A npts 1 boundary N/A nbnd 1 N/A N/A self rec 1 N/A disk N/A html N/A N/A self N/A N/A N/A 
        Generate an HTML representation of the compactness score. This
        is represented as a percentage or "n/a"

        @return: A number formatted similar to "1.00%", or "n/a"
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A self percentage N/A N/A N/A _ n/a N/A N/A PolsbyPopper N/A CalculatorBase N/A N/A 
    Calculator for the Polsby-Popper measure of compactness.

    The Polsby-Popper measure of campactness measures the area of a circle
    with the same perimeter as a district compared to area of the district.

    This calculator will calculate either the compactness score of a single
    district, or it will average the compactness scores of all districts
    in a plan.
     compute N/A N/A self N/A kwargs N/A N/A 
        Calculate the Polsby-Popper measure of compactness.

        @keyword district: A L{District} whose compactness should be 
            computed.
        @keyword plan: A L{Plan} whose district compactnesses should be 
            averaged.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A districts N/A N/A N/A district kwargs N/A N/A districts N/A N/A kwargs N/A district N/A N/A N/A N/A districts N/A 0 geom empty N/A N/A N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom True N/A N/A N/A num 0 N/A compactness 0 N/A district districts N/A N/A N/A N/A district district_id 0 N/A N/A N/A N/A N/A district geom empty N/A N/A N/A perimeter 0 N/A poly N/A district geom N/A N/A linestring poly N/A N/A perimeter N/A linestring length N/A compactness N/A N/A N/A N/A 4 pi N/A N/A district geom area perimeter perimeter N/A num 1 N/A N/A self result N/A value N/A compactness num N/A html N/A N/A self N/A N/A N/A 
        Generate an HTML representation of the compactness score. This
        is represented as a percentage or "n/a"

        @return: A number formatted similar to "1.00%", or "n/a"
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A self percentage N/A N/A N/A _ n/a N/A N/A LengthWidthCompactness N/A CalculatorBase N/A N/A 
    Calculator for the Length/Width measure of compactness.

    The Length/Width measure of campactness measures the length of the 
    district's bounding box, and divides it by the width of the district's
    bounding box.

    This calculator will calculate either the compactness score of a single
    district, or it will average the compactness scores of all districts
    in a plan.
     compute N/A N/A self N/A kwargs N/A N/A 
        Calculate the Length/Width measure of compactness.

        @keyword district: A L{District} whose compactness should be 
            computed.
        @keyword plan: A L{Plan} whose district compactnesses should be 
            averaged.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A districts N/A N/A N/A district kwargs N/A N/A districts N/A N/A kwargs N/A district N/A N/A N/A N/A districts N/A 0 geom empty N/A N/A N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom True N/A N/A N/A num 0 N/A compactness 0 N/A district districts N/A N/A N/A N/A district district_id 0 N/A N/A N/A N/A N/A district geom empty N/A N/A N/A bbox N/A N/A district geom extent N/A lw N/A N/A N/A bbox N/A 3 N/A bbox N/A 1 N/A N/A bbox N/A 2 N/A bbox N/A 0 N/A N/A lw 1 N/A N/A lw N/A 1 lw N/A compactness lw N/A num 1 N/A N/A self result N/A value N/A N/A num 0 N/A compactness num 0 N/A html N/A N/A self N/A N/A N/A 
        Generate an HTML representation of the compactness score. This
        is represented as a percentage or "n/a"

        @return: A number formatted similar to "1.00%", or "n/a"
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A self percentage N/A N/A N/A _ n/a N/A N/A SumValues N/A CalculatorBase N/A N/A 
    Sum up all values.

    For districts, this calculator will sum up a series of arguments.

    For plans, this calculator will sum up a series of arguments across
    all districts. If a literal value is included in a plan calculation,
    that literal value is combined with the subject value for each 
    district.

    For lists of numbers, this calculator will return the sum of the list.

    Each argument should be assigned the argument name "valueN", where N
    is a positive integer. The summation will add all arguments, starting
    at position 1, until an argument is not found.

    This calculator takes an optional "target" argument.  If passed this
    argument, the calculator will return a string suitable for display in
    a plan summary
     compute N/A N/A self N/A kwargs N/A N/A 
        Calculate the sum of a series of values.

        @keyword district: A L{District} whose values should be summed.
        @keyword plan: A L{Plan} whose district values should be summed.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
        @keyword list: A list of values to sum, when summing a set of 
            ScoreArguments.
         N/A districts N/A N/A N/A district kwargs N/A N/A districts N/A N/A kwargs N/A district N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A N/A N/A list kwargs N/A N/A lst N/A kwargs N/A list N/A N/A self result N/A value N/A reduce N/A N/A N/A x y N/A N/A x y lst N/A N/A N/A N/A sumvals 0 N/A district districts N/A N/A argnum 1 N/A N/A N/A value%d argnum N/A self arg_dict N/A N/A number N/A N/A self get_value N/A value%d argnum district N/A N/A N/A number None N/A N/A sumvals number N/A argnum 1 N/A N/A N/A N/A self get_value target None N/A N/A target N/A N/A self get_value target N/A N/A self result N/A value N/A %d (of %s) N/A sumvals target N/A N/A N/A self result N/A value sumvals N/A html N/A N/A self N/A N/A N/A 
        Generate an HTML representation of the summation score. This
        is represented as a decimal formatted with commas or "n/a".

        @return: The result wrapped in an HTML SPAN element: "<span>1</span>".
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A self template <span>{{ result.value|floatformat:0 }}</span> N/A N/A self empty_html_result N/A N/A Percent N/A CalculatorBase N/A N/A 
    Calculate a percentage for two values.

    A percentage calculator requires two arguments: "numerator" and
    "denominator".

    When passed a district, the percentage calculator simply divides the
    numerator by the denominator.

    When passed a plan, the percentage calculator accumulates all the
    numerator values and denominator values for all districts in the plan.
    After the numerator and denominator values have been accumulated, 
    it computes the percentage of those totals.
     compute N/A N/A self N/A kwargs N/A N/A 
        Calculate a percentage.

        @keyword district: A L{District} whose percentage should be 
            calculated.
        @keyword plan: A L{Plan} whose set of districts should be 
            calculated.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A district None N/A N/A district kwargs N/A N/A district N/A kwargs N/A district N/A num N/A N/A self get_value numerator district N/A den N/A N/A self get_value denominator district N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A num 0 N/A den 0 N/A district districts N/A N/A N/A N/A district district_id 0 N/A N/A N/A tmpnum N/A N/A self get_value numerator district N/A tmpden N/A N/A self get_value denominator district N/A N/A N/A tmpnum None N/A tmpden None N/A N/A N/A den tmpden N/A num tmpnum N/A N/A N/A N/A N/A num None N/A den None N/A den 0 N/A N/A N/A N/A N/A N/A self result N/A value N/A num den N/A N/A N/A N/A N/A N/A den N/A value 0 N/A N/A N/A self result N/A value 0 N/A N/A N/A self result N/A value N/A num N/A den N/A value N/A html N/A N/A self N/A N/A N/A 
        Generate an HTML representation of the percentage score. This
        is represented as a decimal formatted with commas or "n/a"

        @return: The result wrapped in an HTML SPAN element, formatted similar to: "<span>1.00%</span>" or "<span>n/a</span>".
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A self percentage N/A N/A self empty_html_result N/A N/A Threshold N/A CalculatorBase N/A N/A 
    Determine a value, and indicate if it exceeds a threshold.

    This calculator accepts two arguments: "value", and "threshold". The
    result of this calculator is 1 or 0, to facilitate the combination of
    scores. One example may be where the number of districts that exceed a
    threshold are required.
    
    If the value computed is less than or equal to the threshold, the 
    result value will be zero (0).

    If the value computed is greater than the threshold, the result value
    will be one (1).

    If this calculator is called with a plan, it will tally up the number
    of districts that exceed the designated threshold.
     compute N/A N/A self N/A kwargs N/A N/A 
        Calculate and determine if a value exceeds a threshold.

        @keyword district: A L{District} whose threshold should be 
            calculated.
        @keyword plan: A L{Plan} whose set of districts should be 
            thresholded.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A districts N/A N/A N/A district kwargs N/A N/A districts N/A N/A kwargs N/A district N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A N/A N/A count 0 N/A district districts N/A N/A val N/A N/A self get_value value district N/A thr N/A N/A self get_value threshold district N/A N/A N/A val None N/A thr None N/A N/A N/A N/A N/A float val N/A float thr N/A N/A count 1 N/A N/A self result N/A value count N/A N/A Range N/A CalculatorBase N/A N/A 
    Determine a value, and indicate if it falls within a range

    This calculator accepts three arguments: "value", "min", and "max". The
    result of this calculator is 1 or 0, to facilitate the combination of
    scores. One example may be where the number of districts that fall 
    within a range are required.

    This calculator accepts an optional argument: 'apply_num_members'.
    If this is set to '1' (True), the calculator will consider the number
    of members assigned to each district when performing calculations.
    This should only be used with population subjects.
    
    If the value computed is greater than or equal to min and less than 
    or equal to max, the result value will be zero (1).

    If the value computed is less than min or greater than max, the result
    value will be one (1).

    If the calculator is passed a plan, then the result value will be the
    number of districts that are within the range. For a test like equi-
    population, this will count the number of districts within the target
    range.
     compute N/A N/A self N/A kwargs N/A N/A 
        Calculate and determine if a value lies within a range.

        @keyword district: A L{District} whose argument should be 
            evaluated.
        @keyword plan: A L{Plan} whose set of districts should be 
            evaluated.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A districts None N/A N/A district kwargs N/A N/A districts N/A N/A kwargs N/A district N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A N/A N/A count 0 N/A N/A apply_num_members N/A self arg_dict N/A N/A apply_num_members N/A N/A int N/A N/A N/A self arg_dict N/A apply_num_members N/A 1 1 N/A N/A apply_num_members False N/A district districts N/A N/A N/A N/A district district_id 0 N/A N/A N/A val N/A N/A self get_value value district N/A N/A apply_num_members N/A N/A district num_members 1 N/A N/A val N/A N/A float val N/A district num_members N/A minval N/A N/A self get_value min district N/A maxval N/A N/A self get_value max district N/A N/A N/A val None N/A minval None N/A maxval None N/A N/A N/A N/A N/A N/A float val N/A float minval N/A N/A float val N/A float maxval N/A N/A count 1 N/A N/A self result N/A value count N/A N/A Contiguity N/A CalculatorBase N/A N/A 
    Calculate the contiguity of a district.

    This calculator accepts two optional arguments: 'allow_single_point',
    and 'target'. If 'allow_single_point' is set to '1' (True), the 
    calculator will consider a district containing muliple polygons 
    contiguous if the polygons are connected to each other by a minimum of 
    one point. By default, this is set to '0' (False), and a district is 
    only considered to be congiguous if it is comprised of a single 
    polygon.

    If 'target' is set, the calculator will format the result to include
    the target value in parenthesis after the calculated value.

    'ContiguityOverride' objects that are applicable to the district will 
    be applied to allow for special cases where non-physical contiguity 
    isn't possible.
    
    If the district is contiguous, the result value will be zero (0).

    If the district is discontiguous, the result value will be one (1).

    If this calculator is called with a plan, it will tally up the number
    of districts that are contiguous.

     compute N/A N/A self N/A kwargs N/A N/A 
        Determine if a district is contiguous.

        @keyword district: A L{District} whose contiguity should be 
            evaluated.
        @keyword plan: A L{Plan} whose set of districts should be 
            evaluated for contiguity.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A districts N/A N/A N/A district kwargs N/A N/A districts N/A N/A kwargs N/A district N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom True N/A N/A N/A N/A allow_single_point N/A self arg_dict N/A N/A allow_single N/A N/A int N/A N/A N/A self arg_dict N/A allow_single_point N/A 1 1 N/A N/A allow_single False N/A count 0 N/A district districts N/A N/A N/A N/A N/A len N/A district geom 1 N/A N/A district district_id 0 N/A N/A count 1 N/A N/A N/A N/A district district_id 0 N/A N/A N/A plan kwargs N/A N/A N/A N/A N/A N/A len N/A district geom 1 N/A N/A count 1 N/A N/A N/A N/A len N/A district geom 0 N/A N/A count 1 N/A N/A overrides N/A N/A district get_contiguity_overrides N/A N/A allow_single N/A N/A len overrides 0 N/A N/A union N/A N/A district geom N/A 0 N/A remaining N/A N/A district geom N/A 1 N/A contiguous True N/A N/A N/A len remaining 0 N/A N/A N/A N/A len N/A district geom 0 N/A N/A N/A match_in_pass False N/A geom remaining N/A N/A linked False N/A N/A allow_single N/A N/A geom touches union N/A N/A linked True N/A N/A override overrides N/A N/A o N/A N/A override override_geounit geom N/A c N/A N/A override connect_to_geounit geom N/A N/A N/A N/A N/A geom contains o N/A N/A union contains c N/A N/A N/A geom contains c N/A N/A union contains o N/A N/A linked True N/A N/A N/A overrides remove override N/A N/A linked N/A N/A N/A N/A remaining remove geom N/A union N/A N/A geom union union N/A match_in_pass True N/A N/A match_in_pass N/A N/A contiguous False N/A N/A contiguous N/A N/A count 1 N/A N/A self result N/A value count N/A N/A N/A target N/A N/A self get_value target N/A N/A target None N/A N/A N/A self result N/A value N/A N/A _ %(value)d (of %(target)s) N/A value target count target N/A N/A N/A N/A N/A html N/A N/A self N/A N/A N/A 
        Generate an HTML representation of the contiguity score. This
        is represented as an image element or the string result wrapped
        in a SPAN element if the result is non-numeric.

        @return: An HTML IMG element in the form of: '<img class="(yes|no)-contiguous" src="/static-media/images/icon-(check|warning).png">'
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A type N/A N/A self result N/A value int N/A N/A N/A N/A N/A self result N/A value 1 N/A N/A <img class="yes-contiguous" src="/static-media/images/icon-check.png"> N/A N/A <img class="no-contiguous" src="/static-media/images/icon-warning.png"> N/A N/A N/A N/A CalculatorBase html self N/A N/A <span>%s</span> N/A self result N/A N/A AllContiguous N/A CalculatorBase N/A N/A 
    Determine if all the districts in a plan are contiguous.

    This calculator uses the Contiguity calculator internally to tally up
    the number of districts that are contiguous, and compares the number
    of contiguous districts to the total number of districts in the plan.

    This calculator will only operate on a plan.
     compute N/A N/A self N/A kwargs N/A N/A 
        Compute the contiguity of all the districts in the plan.

        @keyword plan: A L{Plan} whose set of districts should be 
            evaluated for contiguity.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A N/A N/A plan kwargs N/A N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A calc N/A Contiguity N/A N/A N/A calc compute kwargs N/A N/A self result N/A value N/A N/A N/A len districts 1 N/A N/A calc result N/A value N/A N/A NonContiguous N/A CalculatorBase N/A N/A 
    Calculate the number of districts in a plan that are non-contiguous.

    This calculator accepts a 'target' argument. If set, the result of
    this calculator will be an HTML fragment with the target printed
    next to the calculated value.

    This calculator will only operate on a plan.
     compute N/A N/A self N/A kwargs N/A N/A 
        Compute the number of districts in a plan that are non-contiguous.

        @keyword plan: A L{Plan} whose set of districts should be 
            evaluated for contiguity.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A N/A N/A plan kwargs N/A N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A calc N/A Contiguity N/A N/A N/A calc compute kwargs N/A count N/A N/A len districts N/A calc result N/A N/A N/A target N/A N/A self get_value target N/A N/A target None N/A N/A N/A self result N/A value N/A N/A _ %(value)d (of %(target)s) N/A value target count target N/A N/A N/A N/A N/A self result N/A value count N/A N/A Interval N/A CalculatorBase N/A N/A 
    Used to determine whether a value falls in an interval determined by 
    a central target value and bounds determined to be a percentage of
    that target value.  With bound values of .10 and .20 and a target of 10,
    the intervals would be:
         [-infinity, 8), [8, 9), [9, 11), [11, 12), [12, infinity) 
    
    Given a district, this calculator will return the 0-based index of the
    interval in which the district's value lies - Using the above example, 
    a district with a value of 8.5 would have a result of 1.

    Given a plan, this calculator will return the number of districts that 
    fall in the interval including the target
     compute N/A N/A self N/A kwargs N/A N/A 
        Determine the interval to which a district's value belongs.

        @keyword district: A L{District} whose interval should be computed.
        @keyword plan: A L{Plan} whose set of districts should be 
            evaluated for their intervals.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A districts N/A N/A bounds N/A N/A target N/A Decimal N/A str N/A N/A self get_value target N/A N/A apply_num_members N/A self arg_dict N/A N/A apply_num_members N/A N/A int N/A N/A N/A self arg_dict N/A apply_num_members N/A 1 1 N/A N/A apply_num_members False N/A N/A district kwargs N/A N/A districts N/A N/A kwargs N/A district N/A argnum 1 N/A N/A N/A bound%d argnum N/A self arg_dict N/A N/A bound N/A Decimal N/A str N/A N/A self get_value N/A bound%d argnum N/A N/A N/A bounds append N/A target N/A target bound N/A N/A N/A bounds append N/A target N/A target bound N/A argnum 1 N/A N/A N/A bounds sort N/A district districts N/A N/A value N/A N/A self get_value subject district N/A N/A value None N/A N/A N/A N/A apply_num_members N/A N/A district num_members 1 N/A N/A value N/A value N/A district num_members N/A N/A idx bound N/A enumerate bounds N/A N/A N/A value bound N/A N/A N/A self result N/A index value subject idx value N/A N/A N/A self arg_dict N/A subject N/A 1 N/A N/A N/A self result N/A index value subject N/A len bounds value N/A N/A N/A self arg_dict N/A subject N/A 1 N/A N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom True N/A argnum 1 N/A min_bound None N/A N/A N/A bound%d argnum N/A self arg_dict N/A N/A bound N/A Decimal N/A str N/A N/A self get_value N/A bound%d argnum N/A N/A N/A min_bound N/A bound min_bound N/A N/A min_bound bound N/A argnum 1 N/A max_bound N/A target N/A target min_bound N/A min_bound N/A target N/A target min_bound N/A count 0 N/A district districts N/A N/A value N/A N/A self get_value subject district N/A N/A apply_num_members N/A N/A district num_members 1 N/A N/A value N/A N/A float value N/A district num_members N/A N/A N/A value None N/A value min_bound N/A value max_bound N/A N/A count 1 N/A N/A self result N/A value count N/A N/A N/A html N/A N/A self N/A N/A N/A 
        Returns an HTML representation of the Interval, using a css class 
        called interval_X, with X being the interval index.

        An empty value will have a class of no_interval.

        The span will also have a class named after the subject to make
        multiple intervals available in a panel.

        @return: An HTML SPAN element, in the format: '<span class="interval_X X">1,000</span>'
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A index N/A self result N/A subject N/A self result N/A N/A interval N/A N/A self result N/A index N/A interval_class N/A N/A interval 0 N/A interval_%d interval no_interval N/A t <span class="{{ class }} {{ result.subject }}">{{ result.value|floatformat:0 }}</span> N/A c N/A class interval_class N/A N/A N/A self template t c N/A N/A self empty_html_result N/A N/A Equivalence N/A CalculatorBase N/A N/A 
    Generate a single score based on how closely a set of districts are
    to a target.

    This calculator examines every district in a plan, and generates a
    score which is the difference between the district with the maximum 
    value and the district with the minimum value.

    This calculator requires one argument: 'value', which is the name
    of a subject.
    
    This calculator accepts an optional argument: 'apply_num_members'.
    If this is set to '1' (True), the calculator will consider the number
    of members assigned to each district when performing calculations.
    This should only be used with population subjects.
     compute N/A N/A self N/A kwargs N/A N/A 
        Generate an equivalence score.

        @keyword plan: A L{Plan} whose set of districts should be 
            evaluated for their equivalence.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A N/A N/A district kwargs N/A N/A plan kwargs N/A N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A N/A N/A len districts 0 N/A N/A N/A N/A apply_num_members N/A self arg_dict N/A N/A apply_num_members N/A N/A int N/A N/A N/A self arg_dict N/A apply_num_members N/A 1 1 N/A N/A apply_num_members False N/A min_d 1000000000 N/A max_d 0 N/A district districts N/A N/A N/A N/A district district_id 0 N/A N/A N/A tmpval N/A N/A self get_value value district N/A N/A apply_num_members N/A N/A district num_members 1 N/A N/A tmpval N/A N/A float tmpval N/A district num_members N/A N/A N/A tmpval None N/A N/A min_d N/A min N/A float tmpval min_d N/A max_d N/A max N/A float tmpval max_d N/A N/A self result N/A value N/A max_d min_d N/A html N/A N/A self N/A N/A N/A 
        Generate an HTML representation of the equivalence score. This
        is represented as an integer formatted with commas or "n/a"

        @return: A string in the format of "1,000" or "n/a" if no result.
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A self template {{ result.value|floatformat:0 }} N/A N/A _ n/a N/A N/A RepresentationalFairness N/A CalculatorBase N/A N/A 
    The representational fairness measure, or partisan differential,
    is absolute value of the number of districts where the partisan
    index for a one party is above 50% minus the number of districts
    where the partisan index for the other party is above 50%
    
    The Democratic Partisan Index is the number of democratic 
    votes divided by the combined number of democratic and republican 
    votes. The Republican Partisan Index is the number of republican 
    votes divided by the combined number of democratic and republican 
    votes.

    This calculator requires two arguments: 'democratic' and 'republican'

    When passed a plan, this calculator will compute the
    representational fairness for all districts in the plan.
    The result is a tuple with - the first item is the differential
    and the second item is the party toward which the plan's 
    districts are biased
     compute N/A N/A self N/A kwargs N/A N/A 
        Compute the representational fairness.

        @keyword plan: A L{Plan} whose set of districts should be 
            evaluated for representational fairness.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A N/A N/A dems 0 N/A reps 0 N/A district districts N/A N/A dem N/A N/A self get_value democratic district N/A rep N/A N/A self get_value republican district N/A N/A N/A dem None N/A rep None N/A N/A N/A dem N/A float dem N/A rep N/A float rep N/A N/A N/A dem 0.0 N/A rep 0.0 N/A N/A N/A dem_pi N/A dem N/A rep dem N/A N/A dem_pi 0.5 N/A N/A dems 1 N/A N/A rep_pi N/A rep N/A rep dem N/A N/A rep_pi 0.5 N/A N/A reps 1 N/A N/A self result N/A value N/A dems reps N/A html N/A N/A self N/A N/A N/A 
        Display the results in HTML format. Since the results for this
        calculator are in tuple format for sorting purposes, it's important
        to display a human readable score that explains which party the 
        plan is biased toward.

        @return: An HTML SPAN element similar to the form: "<span>Democrat 5</span>" or "<span>Balanced</span>".
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A sort N/A abs N/A N/A self result N/A value N/A party N/A N/A N/A N/A self result N/A value 0 N/A _ Democrat N/A _ Republican N/A N/A sort 0 N/A N/A N/A <span>%s</span> N/A _ Balanced N/A N/A N/A <span>%s&nbsp;%d</span> N/A party sort N/A N/A <span>%s</span> N/A _ n/a N/A json N/A N/A self N/A N/A N/A 
        Generate a basic JSON representation of the result.

        @return: A JSON object with 1 property: result.
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A sort N/A abs N/A N/A self result N/A value N/A party N/A N/A N/A N/A self result N/A value 0 N/A _ Democrat N/A _ Republican N/A output N/A result N/A %s %d N/A party sort N/A N/A output N/A result None N/A N/A N/A json dumps output N/A sortkey N/A N/A self N/A N/A N/A 
        How should this calculator be compared to others like it? 
        Sort by the absolute value of the result (farther from zero
        is a worse score).

        If the calculator experiences any error, the sortkey value is
        fixed at '99', which will sort all errors to the end of any
        sorted list.

        @return: The absolute value of the result.
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A abs N/A N/A self result N/A value N/A 99 N/A N/A Competitiveness N/A CalculatorBase N/A N/A 
    Compute the plan's Competitiveness.

    Competitiveness is defined here as the number of districts that 
    have a partisan index (democratic or republican) that falls within
    a desired range of .5 (by default).

    This calculator only operates on Plans.

    This calculator requires three arguments: 'democratic', 'republican',
        and 'range'
     compute N/A N/A self N/A kwargs N/A N/A 
        Compute the competitiveness.

        @keyword plan: A L{Plan} whose set of districts should be 
            evaluated for competitiveness.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A N/A N/A plan kwargs N/A N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A N/A N/A difference N/A float N/A N/A self get_value range N/A low N/A 0.5 difference N/A high N/A 0.5 difference N/A N/A N/A N/A low 0.45 N/A high 0.55 N/A fair 0 N/A district districts N/A N/A N/A N/A district district_id 0 N/A N/A N/A tmpdem N/A N/A self get_value democratic district N/A tmprep N/A N/A self get_value republican district N/A N/A N/A tmpdem None N/A tmprep None N/A N/A N/A dem N/A float tmpdem N/A rep N/A float tmprep N/A N/A N/A dem 0.0 N/A rep 0.0 N/A N/A N/A pidx N/A dem N/A dem rep N/A N/A N/A pidx low N/A pidx high N/A N/A fair 1 N/A N/A self result N/A value fair N/A N/A CountDistricts N/A CalculatorBase N/A N/A 
    Verify that the number of districts in a plan matches a target.

    The number of districts counted does not include the special district
    named 'Unassigned'.

    This calculator works on plans only.

    This calculator requires an argument 'target' set to the number of
    districts desired in a plan.  If the number of districts matches
    the target value, a boolean True is the result.
     compute N/A N/A self N/A kwargs N/A N/A 
        Compute the number of districts in a plan.

        @keyword plan: A L{Plan} whose set of districts should be verified 
            against the target.
        @keyword version: Optional. The version of the plan, defaults to
            the most recent version.
        @keyword target: The target number of districts in the plan.
         N/A N/A N/A N/A plan kwargs N/A N/A target N/A self arg_dict N/A N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A target N/A int N/A N/A self get_value target N/A N/A self result N/A value N/A N/A N/A len districts 1 target N/A N/A AllBlocksAssigned N/A CalculatorBase N/A N/A 
    Determine if all the blocks in the state are assigned to a district.
    
    This calculator works on plans only.

    This calculator has an optional argument of 'threshold', which is used
    for buffer in/out optimization.
     compute N/A N/A self N/A kwargs N/A N/A 
        Determine if all the blocks in the plan are assigned to a district.

        @keyword plan: A L{Plan} whose blocks are evaluated for assignment.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
        @keyword threshold: Optional. The amount of simplification used 
            during buffering optimization.
         N/A N/A N/A plan kwargs N/A N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A threshold N/A N/A self get_value threshold N/A N/A threshold N/A N/A threshold 100 N/A geounits N/A N/A plan get_unassigned_geounits threshold threshold version version N/A N/A self result N/A value N/A N/A len geounits 0 N/A N/A Equipopulation N/A CalculatorBase N/A N/A 
    Determine if all the districts in a plan fall within a target range of
    population. This merely wraps a Range calculator, but looks for the
    number of districts outside the range.

    This calculator takes either a "target" or a "validation" parameter.  
    If given a target, it will return a string that's showable in a plan 
    summary.  If given a validation number, it will return a boolean result
    representing whether the given plan has reached that number of 
    majority-minority districts as configured.

    This calculator only operates on Plans.
     compute N/A N/A self N/A kwargs N/A N/A 
        Determine if all the districts in a plan fall within a target
        range.

        @keyword plan: A L{Plan} whose set of districts should be 
            evaluated for equipopulation.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
        @keyword target: Optional. The target number of districts to report
            in the HTML output.
        @keyword validation: Optional. Change the output of the calculator 
            to a boolean measure for plan validity.
         N/A N/A N/A plan kwargs N/A N/A N/A plan N/A kwargs N/A plan N/A inrange N/A Range N/A N/A inrange arg_dict N/A self arg_dict N/A N/A N/A inrange compute kwargs N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A N/A N/A target N/A N/A self get_value target N/A validation N/A N/A self get_value validation N/A N/A validation None N/A N/A N/A self result N/A value N/A N/A N/A inrange result N/A value N/A N/A len districts 1 N/A N/A N/A target None N/A N/A N/A self result N/A value N/A N/A _ %(value)d (of %(target)s) N/A value target N/A N/A inrange result N/A value target N/A N/A N/A self result N/A inrange result N/A N/A N/A N/A N/A self result N/A inrange result N/A N/A MajorityMinority N/A CalculatorBase N/A N/A 
    Determine if at least one district in a plan has a majority of minority
    population.

    This calculator accepts 'population', 'count', 'threshold' arguments, 
    and any number of 'minorityN' arguments, where N is a number starting 
    at 1 and incrementing by 1. If there are gaps in the sequence, only the
    first continuous set of 'minorityN' parameters will be used.

    The 'population' argument is for the general population to be compared
    to the 'minorityN' populations. These should probably by voting age
    populations. The 'count' argument defines AT LEAST how many districts
    must be majority/minority in order for a plan to pass. The 'threshold'
    argument defines the threshold at which a majority is determined.

    This calculator takes either a 'target' or a 'validation' parameter.  
    If given a target, it will return a string that's showable in a plan 
    summary.  If given a validation number, it will return a boolean result
    representing whether the given plan has reached that number of 
    majority-minority districts as configured.

    This calculator works on plans only.
     compute N/A N/A self N/A kwargs N/A N/A 
        Determine if the requisite number of districts in a plan have a 
        majority of minority population. 

        @keyword plan: A L{Plan} whose set of districts should be 
            evaluated for majority minority compliance.
        @keyword version: Optional. The version of the plan, defaults to
            the most recent version.
        @keyword population: The primary population subject.
        @keyword minorityN: The minorty population subjects. Numbering 
            starts at 1, and must be continuous.
        @keyword threshold: Optional. The ratio of all minorityN 
            populations to the population subject when 'majority' is 
            achieved. Defaults to 0.5.
        @keyword target: Optional. The number of districts required to be 
            valid.
        @keyword validation: Optional. Change the output of the calculator
            to a boolean measure for plan validity.
         N/A N/A N/A plan kwargs N/A N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A N/A apply_num_members N/A self arg_dict N/A N/A apply_num_members N/A N/A int N/A N/A N/A self arg_dict N/A apply_num_members N/A 1 1 N/A N/A apply_num_members False N/A districtcount 0 N/A district districts N/A N/A pop N/A N/A self get_value population district N/A N/A pop None N/A N/A N/A den N/A float pop N/A argnum 1 N/A exceeds False N/A N/A N/A minority%d argnum N/A self arg_dict N/A N/A minor N/A N/A self get_value N/A minority%d argnum district N/A argnum 1 N/A N/A minor None N/A N/A N/A num N/A float minor N/A N/A N/A threshold N/A float N/A N/A self get_value threshold district N/A N/A N/A N/A threshold 0.5 N/A N/A N/A den 0 N/A N/A num den threshold N/A N/A exceeds True N/A N/A exceeds N/A N/A apply_num_members N/A N/A districtcount N/A district num_members N/A N/A districtcount 1 N/A N/A self result N/A value districtcount N/A N/A N/A target N/A N/A self get_value target N/A validation N/A N/A self get_value validation N/A N/A validation None N/A N/A N/A self result N/A value N/A districtcount N/A Decimal validation N/A N/A N/A target None N/A N/A N/A self result N/A value N/A N/A _ %(value)d (of %(target)s) N/A value target districtcount target N/A N/A N/A N/A N/A N/A MultiMember N/A CalculatorBase N/A N/A 
    Verify that multi-member plans satisfy all parameters.

    This calculator only operates on Plans.

    All multi-member parameters are pulled from the plan's legislative
    body.
     compute N/A N/A self N/A kwargs N/A N/A 
        Verify that multi-member plans satisfy all parameters.

        @keyword plan: A L{Plan} whose districts should be evaluated for
            multi-member compliance.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A N/A self result N/A value False N/A N/A N/A plan kwargs N/A N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A legbod N/A plan legislative_body N/A N/A legbod multi_members_allowed N/A N/A min_dist_mems N/A legbod min_multi_district_members N/A max_dist_mems N/A legbod max_multi_district_members N/A min_multi_dists N/A legbod min_multi_districts N/A max_multi_dists N/A legbod max_multi_districts N/A min_plan_mems N/A legbod min_plan_members N/A max_plan_mems N/A legbod max_plan_members N/A total_members 0 N/A total_multi_dists 0 N/A d districts N/A N/A N/A N/A d district_id 0 N/A N/A N/A total_members N/A d num_members N/A N/A N/A d num_members 1 N/A N/A total_multi_dists 1 N/A N/A N/A N/A d num_members min_dist_mems N/A N/A d num_members max_dist_mems N/A N/A N/A N/A N/A total_multi_dists min_multi_dists N/A total_multi_dists max_multi_dists N/A N/A N/A N/A N/A total_members min_plan_mems N/A total_members max_plan_mems N/A N/A N/A N/A self result N/A value True N/A N/A Average N/A CalculatorBase N/A N/A 
    Calculate the average of a series of values.

    This calculator will add up all arguments passed into it, and return
    the mathematical mean of their values.

    For a district, this calculator will average a set of scores for 
    each district.

    For a plan, this calculator will average a set of district scores 
    across the entire plan.

    Each argument should be assigned the argument name "valueN", where N
    is a positive integer. The summation will add all arguments, starting
    at position 1, until an argument is not found.
     compute N/A N/A self N/A kwargs N/A N/A 
        Calculate the average of a series of values.

        @keyword list: A list of values to average.
        @keyword district: Optional. A L{District} to get the subject 
            values from. If this is not specified, 'plan' must be provided.
        @keyword plan: Optional. A L{Plan} to get the subject values from. 
            If this is not specified, 'district' must be provided.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A districts N/A N/A N/A list kwargs N/A N/A arg_list N/A kwargs N/A list N/A filtered N/A filter N/A N/A N/A x N/A N/A N/A x None arg_list N/A N/A N/A len filtered 0 N/A N/A N/A reduced N/A reduce N/A N/A N/A x y N/A N/A x y filtered N/A N/A self result N/A value N/A reduced N/A len filtered N/A N/A N/A district kwargs N/A N/A N/A N/A districts append N/A kwargs N/A district N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom False N/A N/A N/A N/A N/A list kwargs N/A N/A total 0.0 N/A count 0.0 N/A district districts N/A N/A N/A N/A district district_id 0 N/A N/A N/A count 1 N/A argnum 0 N/A argsum 0.0 N/A N/A N/A value%d N/A N/A argnum 1 N/A self arg_dict N/A N/A argnum 1 N/A number N/A N/A self get_value N/A value%d argnum district N/A N/A N/A number None N/A N/A argsum N/A float number N/A total N/A argsum argnum N/A N/A count 0 N/A N/A N/A self result None N/A N/A N/A self result N/A value N/A total count N/A html N/A N/A self N/A N/A N/A 
        Generate an HTML representation of the competitiveness score. This
        is represented as a percentage or "n/a"

        @return: The result wrapped in an HTML SPAN element, formatted similar to: "<span>1.00%</span>" or "<span>n/a</span>".
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A type N/A N/A self result N/A value float N/A N/A N/A N/A self percentage span True N/A N/A N/A N/A CalculatorBase html self N/A N/A self empty_html_result N/A N/A Comments N/A CalculatorBase N/A N/A 
    Calculate the comments and types associated with a district.

    Not really a calculator, but this occupies a ScorePanel. This 
    calculator just gets the related comments and tags for districts
    in a plan, to enable a ScorePanel to render them.

    This calculator generates the typetags and labeltags required for
    the comment/tagging form template.

    This calculator only accepts districts.
     compute N/A N/A self N/A kwargs N/A N/A 
        Get the related comments and tags, and store them in a dict for
        the result. The result is suitable for passing to the template
        that renders the comment sidebar.

        @keyword district: The district whose comments should be retrieved.
         N/A N/A N/A district kwargs N/A N/A N/A district N/A kwargs N/A district N/A typetags N/A filter N/A N/A N/A tag N/A N/A N/A N/A tag name N/A 4 type N/A district tags N/A typetags N/A map N/A N/A N/A tag N/A N/A N/A tag name N/A 5 typetags N/A N/A self result N/A typetags typetags N/A html N/A N/A self N/A N/A N/A 
        Override the default html method. This is required due to the cache
        mechanism.

        @return: A dict of typetags.
         N/A N/A self result N/A N/A CommunityTypeCounter N/A CalculatorBase N/A N/A 
    Count the number of community types which intersect a given district.
    For districts, this calculator will count the number of distinct
    community types that intersect the district.

    This calculator, in addition to requiring a "districts" argument, 
    requires a "community_map_id" argument, which is the primary key
    of the community map (L{Plan}) that is being compared to the district,
    and a "version" argument indicating the version number of the 
    community map.

    This calculator will only operate on a district.
     compute N/A N/A self N/A kwargs N/A N/A 
        Count the number of community types which intersect a district.

        @keyword district: The L{District} to compare against the community
            map.
        @keyword community_map_id: The ID of the community map.
        @keyword version: Optional. The version of the community map. 
            Defaults to the latest version of the community map.
         N/A N/A district kwargs N/A N/A district N/A kwargs N/A district N/A N/A N/A version None N/A N/A version kwargs N/A N/A version N/A kwargs N/A version N/A N/A self result N/A value N/A _ n/a N/A N/A community_map_id kwargs N/A N/A N/A N/A N/A self result N/A value N/A N/A district count_community_type_union N/A kwargs N/A community_map_id version version N/A N/A N/A N/A N/A N/A CommunityTypeCompatible N/A CalculatorBase N/A N/A 
    This calculator determines if all districts in a plan are type-
    compatible. A type-compatible community map contains the same community
    types in across all districts.

    This calculator requires a "community_map_id" argument, which is the 
    primary key of the community map (L{Plan}) that is being compared to 
    the L{Plan} and a "version" argument indicating the version number of
    the community map.

    This calculator will only operate on a plan.
     compute N/A N/A self N/A kwargs N/A N/A 
        Evaluate a L{Plan} to determine if it is type-compatible. A L{Plan}
        will be type-compatible if the type provided is in all L{District}s
        of the plan.

        @keyword plan: The L{Plan} to compare against the community
            map.
        @keyword community_map_id: The ID of the community map.
        @keyword plan_version: Optional, The version of the plan.
            Defaults to the latest version of the plan.
        @keyword community_version: Optional. The version of the community 
            map.  Defaults to the latest version of the community map.
        @keyword type: The community type to check for compatibility.
         N/A N/A N/A plan kwargs N/A N/A N/A plan N/A kwargs N/A plan N/A N/A plan_version kwargs N/A N/A pversion N/A kwargs N/A plan_version N/A N/A pversion N/A plan version N/A N/A community_version kwargs N/A N/A cversion N/A kwargs N/A community_version N/A N/A cversion None N/A districts N/A N/A plan get_districts_at_version pversion include_geom True N/A N/A N/A community_map_id kwargs N/A N/A N/A self result N/A value n/a N/A N/A ctype N/A kwargs N/A type N/A N/A N/A N/A ctype startswith type= N/A N/A ctype N/A type= ctype N/A community_id N/A kwargs N/A community_map_id N/A alltypes None N/A district districts N/A N/A N/A district is_unassigned N/A N/A N/A tmpset N/A N/A district get_community_type_union community_id version cversion N/A N/A alltypes None N/A N/A alltypes tmpset N/A N/A alltypes N/A alltypes tmpset N/A alltypes N/A map N/A N/A N/A x N/A N/A str N/A x name alltypes N/A N/A self result N/A value N/A ctype alltypes N/A N/A SplitCounter N/A CalculatorBase N/A N/A 
    This calculator determines which districts are "split" and how
    often by the districts in a different plan.

    This calculator accepts a "boundary_id" argument, which consists of
    a plan type and id, e.g., "geolevel.1" or "plan.3".

    This calculator also accepts an optional "inverse" value. If this
    is set to 1 (true), the inverse calculation will take place:
    the bottom layer will be treated as the top layer and vice versa.
    
    This calculator also accepts an optional "only_total" value. If this
    is set to 1 (true), only the total number of splits will be returned.
    
    A "version" argument may be supplied to compare a given version of
    the plan in the keyword args to the plan/geolevel given in the 
    boundary_id.
     compute N/A N/A self N/A kwargs N/A N/A 
        Calculate splits between a plan and a target layer.

        @keyword plan: A L{Plan} whose districts will be analyzed for 
            splits.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
        @keyword boundary_id: The layer type and ID to compare for splits.
        @keyword inverse: A flag to indicate if the splits should be 
            compared forward or backward.
        @keyword only_total: A flag to indicate if only the total number
            of splits should be returned.
         N/A N/A N/A plan kwargs N/A N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A self get_value version N/A N/A version None N/A N/A version N/A plan version N/A target N/A N/A self get_value boundary_id N/A inverse N/A N/A N/A self get_value inverse 1 N/A only_total N/A N/A N/A self get_value only_total 1 N/A splits N/A N/A plan compute_splits target version version inverse inverse N/A N/A self result N/A value only_total N/A only_total N/A len N/A splits N/A splits splits only_total N/A html N/A N/A self N/A N/A N/A 
        Generate an HTML representation of the split report. This is 
        represented as an HTML fragment containing a TABLE element with
        the splits listed in the cells.

        @return: An HTML TABLE element with the split geographies/districts.
         N/A render <div class="split_report"> N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A r N/A N/A self result N/A value N/A N/A N/A self result N/A only_total N/A N/A N/A <span>%d</span> r N/A total_split_districts N/A len N/A set N/A N/A i N/A 0 N/A i N/A r N/A splits N/A N/A r N/A is_geolevel N/A N/A template N/A <div>%s</div> N/A _ Total %(district_type_a)s which split a %(district_type_b)s: %(result)d N/A N/A template N/A <div>%s</div> N/A _ Total %(district_type_a)s splitting "%(district_type_b)s": %(result)d</div> N/A render N/A template N/A district_type_a district_type_b result N/A N/A r N/A is_community communities districts N/A r N/A other_name total_split_districts N/A render N/A <div>%s: %d</div> N/A N/A _ Total number of splits N/A len N/A r N/A splits N/A render N/A <div class="table_container"><table class="report"><thead><tr><th>%s</th><th>%s</th></tr></thead><tbody> N/A N/A N/A N/A r N/A plan_name capitalize N/A N/A r N/A is_geolevel N/A N/A N/A r N/A other_name capitalize N/A N/A N/A r N/A other_name capitalize N/A s N/A r N/A named_splits N/A N/A render N/A <tr><td>%s</td><td>%s</td></tr> N/A N/A s N/A geo N/A s N/A interior N/A render </tbody></table></div> N/A render </div> N/A render N/A N/A DistrictSplitCounter N/A CalculatorBase N/A N/A 
    This calculator determines how many times a district splits a given geolevel.

    This calculator accepts a "geolevel_id" argument, which is the id of 
    the geolevel in which to perform the split comparison.
     compute N/A N/A self N/A kwargs N/A N/A 
        Calculate splits between a district and a target geolevel.

        @keyword district: A L{District} whose splits should be computed.
        @keyword boundary_id: The ID of the geolevel to compare for splits.
         N/A N/A N/A district kwargs N/A N/A N/A district N/A kwargs N/A district N/A N/A N/A district geom empty N/A N/A N/A geolevel_id N/A N/A self get_value geolevel_id N/A num_splits N/A N/A district count_splits geolevel_id N/A N/A self result N/A value num_splits N/A N/A ConvexHullRatio N/A CalculatorBase N/A N/A 
    Calculate the ratio of the area of a district to the area of its convex hull.
    
    This calculator will either calculate a single district's convex hull ratio,
    or the average convex hull ratio of all districts.
     compute N/A N/A self N/A kwargs N/A N/A 
        Calculate the convex hull ratio of a district or a plan.

        @keyword district: A L{District} whose convex hull ratio should be 
            computed.
        @keyword plan: A L{Plan} whose district convex hull ratios should be 
            averaged.
        @keyword version: Optional. The version of the plan, defaults to 
            the most recent version.
         N/A districts N/A N/A N/A district kwargs N/A N/A districts N/A N/A kwargs N/A district N/A N/A N/A N/A districts N/A 0 geom empty N/A N/A N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version include_geom True N/A N/A N/A num 0 N/A ratios 0.0 N/A district districts N/A N/A N/A N/A N/A district geom empty N/A N/A N/A district geom length 0 N/A N/A district district_id 0 N/A N/A N/A ratios N/A N/A N/A district geom area N/A N/A N/A district geom convex_hull area N/A num 1 N/A N/A self result N/A value N/A N/A num 0 N/A ratios num 0 N/A html N/A N/A self N/A N/A N/A 
        Generate an HTML representation of the convex hull ratio. This
        is represented as a percentage or "n/a"

        @return: A number formatted similar to "1.00%", or "n/a"
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A N/A N/A self percentage N/A N/A N/A _ n/a N/A N/A Adjacency N/A CalculatorBase N/A N/A 
    Calculates travel time, costs, etc. between sections in a district, normalizes by region
    travel time.
     _district_calculator N/A N/A self district N/A N/A sum_query N/A N/A query N/A N/A N/A N/A sum N/A map N/A N/A N/A x N/A N/A x N/A float x 0 N/A N/A N/A self r mget query N/A N/A geounit_ids N/A N/A geo N/A 1 N/A geo N/A N/A district get_base_geounits N/A N/A N/A geounit_ids sort N/A geounit_id_combos N/A N/A itertools combinations geounit_ids 2 N/A redis_query N/A N/A total 0 N/A num_queries 0 N/A N/A count ids N/A enumerate geounit_id_combos N/A N/A num_queries 1 N/A N/A N/A N/A count 10000 0 N/A count 0 N/A N/A total N/A sum_query redis_query N/A redis_query N/A N/A N/A N/A redis_query append N/A key_gen N/A geounit1 geounit2 N/A ids N/A 0 N/A ids N/A 1 N/A total N/A sum_query redis_query N/A N/A num_queries 0 N/A N/A 0 N/A N/A total num_queries N/A compute N/A N/A self N/A kwargs N/A N/A 
        Calculate the average costs for a district or the overall score for a plan.

        The score for a district is the average cost between all sections within a district.

        The score for a plan is a normalized sum of costs for districts within the plan.

        @keyword district: A L{District} whose cost ratio should be calculated

        @keyword plan: A L{Plan} whose total cost ratio should be calculated

        @keyword version: Optional. The version of the plan, defaults to 
        the most recent version.

        @keyword host: Optional. The host to connect to redis, defaults to value in settings.

        @keyword port: Optional. The port to connect to redis, defaults to value in settings.

        @keyword redis_db: Optional. The redis database number to connect to, defaults to value in settings.
         N/A redis_host N/A N/A kwargs get host N/A redis_settings N/A HOST N/A redis_port N/A int N/A N/A kwargs get port N/A redis_settings N/A PORT N/A redis_db N/A int N/A N/A kwargs get db N/A redis_settings N/A DB N/A N/A self r N/A N/A redis StrictRedis host redis_host port redis_port db redis_db N/A districts N/A N/A N/A district kwargs N/A N/A districts N/A N/A kwargs N/A district N/A N/A N/A N/A districts N/A 0 geom empty N/A N/A N/A N/A N/A plan kwargs N/A N/A plan N/A kwargs N/A plan N/A version N/A N/A version kwargs N/A kwargs N/A version N/A plan version N/A districts N/A N/A plan get_districts_at_version version N/A score 0 N/A N/A N/A len districts 1 N/A N/A score N/A N/A N/A N/A districts N/A 0 district_id 0 0 N/A N/A self _district_calculator N/A districts N/A 0 N/A N/A N/A N/A len districts 1 N/A N/A district_scores N/A N/A district districts N/A N/A N/A N/A district district_id 0 N/A N/A N/A district_score N/A N/A self _district_calculator district N/A N/A N/A district_scores append district_score N/A region N/A N/A N/A N/A N/A districts N/A 0 plan legislative_body region name N/A region_key N/A key_gen N/A region region N/A region_score N/A float N/A N/A N/A self r get region_key N/A num_districts N/A len district_scores N/A district district_scores N/A N/A numerator N/A N/A district N/A region_score num_districts 2 N/A denominator N/A N/A region_score num_districts 2 N/A score N/A numerator denominator N/A N/A self result N/A value score N/A html N/A N/A self N/A N/A N/A 
        Generates an HTML representation of adjacency scores. This is represented as a decimal
        number.

        @return: A number formatted similar to "10.01"
         N/A N/A N/A N/A N/A self result None N/A value N/A self result N/A N/A t N/A Template {{ result_value|floatformat:2 }} N/A c N/A Context N/A result_value N/A N/A self result N/A value N/A N/A N/A t render c N/A N/A N/A _ n/a N/A N/A