<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def devices(self) -> selectiontools.Selection: """The additional devices defined for the respective `reader` or `writer` element contained within a |Selection| object. ToDo If the `reader` or `writer` element does not define its own additional devices, |XMLInterface.devices| of |XMLInterface| is used. all input data Nodes() \ Elements("land_dill", "land_lahn_1", "land_lahn_2", "land_lahn_3") precipitation Nodes() Elements("land_lahn_1", "land_lahn_2") soilmoisture Nodes("dill") Elements("land_dill", "land_lahn_1") averaged Nodes() Elements() """

        devices = self.find('devices')
        master = self
        while devices is None:
            master = master.master
            devices = master.find('devices')
        return _query_devices(devices)