code: def iterdecode(self, s, triples=False):
          
          pos, strlen = 0, len(s)
          while pos < strlen:
              if s[pos] == '#':
                  while pos < strlen and s[pos] != '\n':
                      pos += 1
              elif triples or s[pos] == '(':
                  try:
                      if triples:
                          span, data = self._decode_triple_conjunction(
                              s, pos=pos
                          )
                      else:
                          span, data = self._decode_penman_node(s, pos=pos)
                  except (IndexError, DecodeError):
                      # don't re-raise below for more robust parsing, but
                      # for now, raising helps with debugging bad input
                      raise
                      pos += 1
                  else:
                      top, nodes, edges = data
                      yield self.triples_to_graph(nodes + edges, top=top)
                      pos = span[1]
              else:
                  pos += 1
docs: Deserialize PENMAN-notation string *s* into its Graph objects.
  
          Args:
              s: a string containing zero or more PENMAN-serialized graphs
              triples: if True, treat *s* as a conjunction of logical triples
          Yields:
              valid Graph objects described by *s*
          Example:
  
              >>> codec = PENMANCodec()
              >>> list(codec.iterdecode('(h / hello)(g / goodbye)'))
              [<Graph object (top=h) at ...>, <Graph object (top=g) at ...>]
              >>> list(codec.iterdecode(
              ...     'instance(h, hello)\n'
              ...     'instance(g, goodbye)'
              ... ))
              [<Graph object (top=h) at ...>, <Graph object (top=g) at ...>]