code: def serialize(self, root: "Node") -> str:
      """Encodes a tree to a single string.
  
      :type root: Node
      :rtype: str
      """
      if root is None:
          return ""
      q = deque([root])
      res = []
      q.append("#")
      while q:
          sz = len(q)
          for _ in range(sz):
              node = q.popleft()
              if node == "#":
                  res.append("#")
                  continue
              # print(node)
              res.append(str(node.val))
              for c in node.children:
                  q.append(c)
              q.append("#")
          # res.append('#')
      return ",".join(res)
  
label_desc: Use image node_id 1 for calling the Codec obj's underlying member method code with example usage: obj.serialize(root) and returns: str, str