code: def parsesingle(s, strictmode=True, expansionlimit=None, convertpos=False):
      '''like parse, but only consumes a single top level node, e.g. parsing
      'a\nb' will only return a node for 'a', leaving b unparsed'''
      p = _parser(s, strictmode=strictmode, expansionlimit=expansionlimit)
      tree = p.parse()
      if convertpos:
          ast.posconverter(s).visit(tree)
      return tref parsesingle(s, strictmode=True, expansionlimit=None, convertpos=False):
      '''like parse, but only consumes a single top level node, e.g. parsing
      'a\nb' will only return a node for 'a', leaving b unparsed'''
      p = _parser(s, strictmode=strictmode, expansionlimit=expansionlimit)
      tree = p.parse()
      if convertpos:
          ast.posconverter(s).visit(tree)
      return tree
docs: like parse, but only consumes a single top level node, e.g. parsing
      'a\nb' will only return a node for 'a', leaving b unparsed