def RecursiveDictionaryExtraction(Dictionary):
    """
    WARNING: This function is for internal use.
    This function goes into a tree structures as embedded dictionaries and returns the sum of all the leaves
    """
    if isinstance(Dictionary, dict):
        Values = [RecursiveDictionaryExtraction(
            Dictionary[x]) for x in Dictionary.keys()]
        return sum(Values)
    else:
        return Dictionary