def generate_huffman_codes(node, prefix):
    """
    Generate Huffman codes for each character by traversing the tree
    and assigning '0' to a move towards left child node and '1' to right child node.

    Parameters:
        node (class: Node): root node of Huffman Tree
        prefix (str): starting prefix
    Returns:
        huffman_codes (dictionary): map of characters to generated Huffman codes
    """

    huffman_codes = {}

    def generate_codes(node, prefix=""):
        if node is None:
            return
        if node.right_child is None and node.left_child is None:
            huffman_codes[node.char] = prefix
        generate_codes(node.left_child, prefix + '0')
        generate_codes(node.right_child, prefix + '1')

    generate_codes(node)

    return huffman_codes