def dunder_partition(key):
    """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')
    """
    parts = key.rsplit('__', 1)
    return tuple(parts) if len(parts) > 1 else (parts[0], None)