def cut(self, path=None, lineno=None, firstlineno=None, excludepath=None):
for x in self:<EOL><INDENT>code = x.frame.code<EOL>codepath = code.path<EOL>if (<EOL>(path is None or codepath == path)<EOL>and (<EOL>excludepath is None<EOL>or not hasattr(codepath, "<STR_LIT>")<EOL>or not codepath.relto(excludepath)<EOL>)<EOL>and (lineno is None or x.lineno == lineno)<EOL>and (firstlineno is None or x.frame.code.firstlineno == firstlineno)<EOL>):<EOL><INDENT>return Traceback(x._rawentry, self._excinfo)<EOL><DEDENT><DEDENT>return self<EOL>
return a Traceback instance wrapping part of this Traceback

            by provding any combination of path, lineno and firstlineno, the
            first frame to start the to-be-returned traceback is determined

            this allows cutting the first part of a Traceback instance e.g.
            for formatting reasons (removing some uninteresting bits that deal
            with handling of the exception/traceback)