I'm not sure I'm in favor of this way of writing it (\n<Name>\n)...., Maybe it would be better to instead remove those two newlines and add a newline after "." but before filter?

(If this is how pep8 wants it, fine, just not sure if this makes it clearer)