code: def parse_node(node):
      
      if node is None or node == b'':
          raise InvalidNode("Blank node is not a valid node type in Binary Trie")
      elif node[0] == BRANCH_TYPE:
          if len(node) != 65:
              raise InvalidNode("Invalid branch node, both child node should be 32 bytes long each")
          # Output: node type, left child, right child
          return BRANCH_TYPE, node[1:33], node[33:]
      elif node[0] == KV_TYPE:
          if len(node) <= 33:
              raise InvalidNode("Invalid kv node, short of key path or child node hash")
          # Output: node type, keypath: child
          return KV_TYPE, decode_to_bin_keypath(node[1:-32]), node[-32:]
      elif node[0] == LEAF_TYPE:
          if len(node) == 1:
              raise InvalidNode("Invalid leaf node, can not contain empty value")
          # Output: node type, None, value
          return LEAF_TYPE, None, node[1:]
      else:
          raise InvalidNode("Unable to parse node")
docs: Input: a serialized node