@classmethod<EOL><INDENT>def parse(cls, content, is_pyproject=False):<DEDENT>
parsed = pytoml.loads(content)<EOL>if is_pyproject:<EOL><INDENT>parsed = parsed.get('<STR_LIT>', {})<EOL><DEDENT>parsed = parsed.get('<STR_LIT>', {})<EOL>return parsed<EOL>
A convenience method for parsing a TOML-serialized configuration.

:param content: a TOML string containing a TidyPy configuration
:type content: str
:param is_pyproject:
    whether or not the content is (or resembles) a ``pyproject.toml``
    file, where the TidyPy configuration is located within a key named
    ``tool``.
:type is_pyproject: bool
:rtype: dict