code: def _generate_codes(tree: Node) -> dict:
      codes = dict()
      HuffmanCoding._go_through_tree_and_create_codes(tree, "", codes)
      return codes
  
imports: from collections import defaultdict, deque
  import heapq
label_desc: Use image node_id 7 for calling the HuffmanCoding obj's underlying member method code with example usage: obj._generate_codes(tree) and returns: codes