[lxml-dev] helper functions for accepting elementtrees/elements/documents as input