code: def _parse_tokens(tokens):
      
  
      index = 0
      parsed_tokens = []
  
      num_tokens = len(tokens)
      while index < num_tokens:
          tok = Token(*tokens[index])
  
          assert tok.token_type != token.INDENT
          if tok.token_type == tokenize.NEWLINE:
              # There's only one newline and it's at the end.
              break
  
          if tok.token_string in '([{':
              (container, index) = _parse_container(tokens, index)
              if not container:
                  return None
              parsed_tokens.append(container)
          else:
              parsed_tokens.append(Atom(tok))
  
          index += 1
  
      return parsed_tokens
docs: Parse the tokens.
  
      This converts the tokens into a form where we can manipulate them
      more easily.