<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(code, tree, prefix=[]):
 """Extract Huffman code from a Huffman tree :param tree: a node of the tree :param prefix: a list with the 01 characters encoding the path from the root to the node `tree` :complexity: O(n) """

    if isinstance(tree, list):
        l, r = tree
        prefix.append('0')
        extract(code, l, prefix)
        prefix.pop()
        prefix.append('1')
        extract(code, r, prefix)
        prefix.pop()
    else:
        code[tree] = ''.join(prefix)