<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extract(d, path=None):
 """ extract section of dictionary Parameters d : dict path : list[str] keys to section Returns ------- new_dict : dict original, without extracted section extract_dict : dict extracted section Examples -------- ({1: {'a': 'A'}, 2: {'c': 'C'}}, {'b': 'B'}) """

    path = [] if path is None else path

    d_new = copy.deepcopy(d)
    d_sub = d_new
    for key in path[:-1]:
        d_sub = d_sub[key]

    key = path[-1]
    d_extract = {key: d_sub[key]}
    d_sub.pop(key)

    return d_new, d_extract