<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def selections(self) -> selectiontools.Selections: """The |Selections| object defined for the respective `reader` or `writer` element of the actual XML file. ToDo If the `reader` or `writer` element does not define a special selections element, the general |XMLInterface.selections| element of |XMLInterface| is used. all input data () precipitation ('headwaters',) soilmoisture ('complete',) averaged ('complete',) """

        selections = self.find('selections')
        master = self
        while selections is None:
            master = master.master
            selections = master.find('selections')
        return _query_selections(selections)