<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def preprocess_tree(self, tree):
 """Transform internal refuri targets in reference nodes to refids and transform footnote rubrics so that they do not end up in the output"""

        visitor = RinohTreePreprocessor(tree, self)
        tree.walkabout(visitor)