<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fromtree(cls, tree):
 """ Create a METS from an ElementTree or Element. :param ElementTree tree: ElementTree to build a METS document from. """

        mets = cls()
        mets.tree = tree
        mets._parse_tree(tree)

        return mets