original_docstring: Decodes your encoded data to tree.
  
          :type data: str
          :rtype: Node
          
docstring: Decodes your encoded data to tree.
docstring_tokens: Decodes your encoded data to tree .
code: def deserialize(self, data):
          """Decodes your encoded data to tree.
  
          :type data: str
          :rtype: Node
          """
          if data == '':
              return None
  
          # Non-recursive
  
          num = ''
          stack = []
          for ch in data:
              if ch == '{':
                  curr = Node(int(num), [])
                  num = ''
                  if not stack:
                      # first element
                      root = curr
                  else:
                      stack[-1].children.append(curr)
                  stack.append(curr)
              elif ch == '}':
                  stack.pop()
              else:
                  num += ch
  
          return root
  
          # recursive
  
          # ret = Node(0, [])
  
          # ret.val = int(data[:idx_left_bracket])
          # data = data[idx_left_bracket+1:]
          # counter = 0
          # start = 0
          # for idx, ch in enumerate(data):
          #     if ch == '{':
          #         counter += 1
          #     elif ch == '}':
          #         counter -= 1
          #         if counter == 0:
          #             # print 'append ', data[start:idx+1]
          #             ret.children.append(self.deserialize(data[start:idx+1]))
          #             start = idx + 1
  
          # return ret
code_tokens: def deserialize ( self , data ) : if data == '' : return None num = '' stack = [ ] for ch in data : if ch == '{' : curr = Node ( int ( num ) , [ ] ) num = '' if not stack : root = curr else : stack [ - 1 ] . children . append ( curr ) stack . append ( curr ) elif ch == '}' : stack . pop ( ) else : num += ch return root
short_docstring: Decodes your encoded data to tree.
short_docstring_tokens: Decodes your encoded data to tree .
comment: """Decodes your encoded data to tree.
  
          :type data: str
          :rtype: Node
          """$SEP$# Non-recursive$SEP$# first element$SEP$# recursive$SEP$# ret = Node(0, [])$SEP$# ret.val = int(data[:idx_left_bracket])$SEP$# data = data[idx_left_bracket+1:]$SEP$# counter = 0$SEP$# start = 0$SEP$# for idx, ch in enumerate(data):$SEP$#     if ch == '{':$SEP$#         counter += 1$SEP$#     elif ch == '}':$SEP$#         counter -= 1$SEP$#         if counter == 0:$SEP$#             # print 'append ', data[start:idx+1]$SEP$#             ret.children.append(self.deserialize(data[start:idx+1]))$SEP$#             start = idx + 1$SEP$# return ret