

def dunder_partition(key):
    "Splits a dunderkey into 2 parts\n\n    The first part is everything before the final double underscore\n    The second part is after the final double underscore\n\n        >>> dunder_partition('a__b__c')\n        >>> ('a__b', 'c')\n\n    :param neskey : String\n    :rtype        : 2 Tuple\n\n    "
    parts = key.rsplit('__', 1)
    return (tuple(parts) if (len(parts) > 1) else (parts[0], None))

dataset/ETHPy150Open naiquevin/lookupy/lookupy/dunderkey.py dunder_partition/original