def huffman_encoding_recursion(node, code=''):
    """
    Encoding characters using recursion
    Args:
      node(HuffManTreeNode):  leaf to save data and non-leaf node assign 0 and 1 to edges
      code(str): Assign 0 to the left edge and 1 to the right edge 

    Returns:
      encode_map(dict) : huffman coding map table
    """
    if type(node) is str:
        return {node: code}

    encode_map = dict()

    left_node = node.get_left_child()
    right_node = node.get_right_child()

    encode_map.update(huffman_encoding_recursion(left_node, code + '0'))
    encode_map.update(huffman_encoding_recursion(right_node, code + '1'))
    return encode_map