Module FunctionDef arguments args defaults vararg body Expr Str Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Num Return IfExp CompareGt Call NameLoad NameLoad Num Call NameLoad NameLoad TupleLoad SubscriptLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return SubscriptLoad Call NameLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return SubscriptLoad Call NameLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Num TryExcept body Assign NameStore SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Return NameLoad orelse Return IfExp CompareEq Call NameLoad NameLoad Num NameLoad Call NameLoad NameLoad SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Return Dict SubscriptLoad NameLoad Index Num IfExp CompareEq Call NameLoad NameLoad Num NameLoad Call NameLoad SubscriptLoad NameLoad Index Num NameLoad decorator_list Assign NameStore Dict For NameStore ListComp Call NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad Call NameLoad Call AttributeLoad NameLoad attr Index Num If CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Return IfExp CompareEq Call AttributeLoad Call NameLoad Call NameLoad NameLoad NameLoad attr NameLoad Num NameLoad NameLoad decorator_list Assign NameStore ListComp Call NameLoad NameLoad NameLoad comprehension NameStore NameLoad Return Call NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr decorator_list
N/A dunderkey N/A N/A N/A args N/A N/A Produces a nested key from multiple args separated by double
    underscore

       >>> dunderkey('a', 'b', 'c')
       >>> 'a__b__c'

    :param *args : *String
    :rtype       : String
     N/A N/A N/A __ join args N/A dunder_partition N/A N/A key N/A N/A N/A Splits a dunderkey into 2 parts

    The first part is everything before the final double underscore
    The second part is after the final double underscore

        >>> dunder_partition('a__b__c')
        >>> ('a__b', 'c')

    :param neskey : String
    :rtype        : 2 Tuple

     N/A parts N/A N/A key rsplit __ 1 N/A N/A N/A N/A len parts 1 N/A tuple parts N/A N/A parts N/A 0 None N/A dunder_init N/A N/A key N/A N/A N/A Returns the initial part of the dunder key

        >>> dunder_init('a__b__c')
        >>> 'a__b'

    :param neskey : String
    :rtype        : String
     N/A N/A N/A dunder_partition key N/A 0 N/A dunder_last N/A N/A key N/A N/A N/A Returns the last part of the dunder key

        >>> dunder_last('a__b__c')
        >>> 'c'

    :param neskey : String
    :rtype        : String
     N/A N/A N/A dunder_partition key N/A 1 N/A dunder_get N/A N/A _dict key N/A N/A N/A Returns value for a specified dunderkey

    A "dunderkey" is just a fieldname that may or may not contain
    double underscores (dunderscores!) for referrencing nested keys in
    a dict. eg::

         >>> data = {'a': {'b': 1}}
         >>> nesget(data, 'a__b')
         1

    key 'b' can be referrenced as 'a__b'

    :param _dict : (dict)
    :param key   : (str) that represents a first level or nested key in the dict
    :rtype       : (mixed) value corresponding to the key

     N/A parts N/A N/A key split __ 1 N/A N/A N/A result N/A _dict N/A N/A parts N/A 0 N/A N/A N/A KeyError N/A N/A None N/A N/A N/A N/A N/A len parts 1 result N/A dunder_get result N/A parts N/A 1 N/A undunder_keys N/A N/A _dict N/A N/A N/A Returns dict with the dunder keys converted back to nested dicts

    eg::

        >>> undunder_keys({'a': 'hello', 'b__c': 'world'})
        {'a': 'hello', 'b': {'c': 'world'}}

    :param _dict : (dict) flat dict
    :rtype       : (dict) nested dict

     f N/A N/A key value N/A N/A N/A parts N/A N/A key split __ N/A N/A N/A parts N/A 0 N/A N/A N/A len parts 1 value N/A f N/A parts N/A 1 value N/A N/A result N/A N/A r N/A N/A f k v N/A N/A k v N/A N/A _dict items N/A N/A rk N/A N/A list N/A N/A r keys N/A 0 N/A N/A rk result N/A N/A N/A N/A result update r N/A N/A N/A N/A N/A result N/A rk update N/A r N/A rk N/A result N/A dunder_truncate N/A N/A _dict N/A N/A N/A Returns dict with dunder keys truncated to only the last part

    In other words, replaces the dunder keys with just last part of
    it. In case many identical last parts are encountered, they are
    not truncated further

    eg::

        >>> dunder_truncate({'a__p': 3, 'b__c': 'no'})
        {'c': 'no', 'p': 3}
        >>> dunder_truncate({'a__p': 'yay', 'b__p': 'no', 'c__z': 'dunno'})
        {'a__p': 'yay', 'b__p': 'no', 'z': 'dunno'}

    :param _dict : (dict) to flatten
    :rtype       : (dict) flattened result

     N/A keylist N/A list N/A N/A _dict keys decide_key N/A N/A k klist N/A N/A N/A newkey N/A dunder_last k N/A N/A N/A N/A N/A N/A list N/A map dunder_last klist count newkey 1 newkey k N/A N/A original_keys N/A N/A decide_key key keylist N/A key keylist N/A N/A dict N/A zip original_keys N/A N/A _dict values N/A