docstr: Create a message structure from a string.
  
  Returns the root of the message structure.  Optional headersonly is a
  flag specifying whether to stop parsing after reading the headers or
  not.  The default is False, meaning it parses the entire contents of
  the file.
docstr_tok: ["Create","a","message","structure","from","a","string",".","Returns","the","root","of","the","message","structure",".","Optional","headersonly","is","a","flag","specifying","whether","to","stop","parsing","after","reading","the","headers","or","not",".","The","default","is","False",",","meaning","it","parses","the","entire","contents","of","the","file","."]
code: def parsestr(self, text, headersonly=False):
      """Create a message structure from a string.
  
      Returns the root of the message structure.  Optional headersonly is a
      flag specifying whether to stop parsing after reading the headers or
      not.  The default is False, meaning it parses the entire contents of
      the file.
      """
      return self.parse(StringIO(text), headersonly=headersonly)
  
file_path: catboost/contrib/tools/python3/src/Lib/email/parser.py
imports: from io import StringIO, TextIOWrapper
  from email.feedparser import FeedParser, BytesFeedParser
  from email._policybase import compat32
label_desc: Use image node_id 3 for calling the Parser obj's underlying member method code with example usage: obj.parsestr(text, headersonly) and returns: self