<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def elements(self) -> Iterator[devicetools.Element]: """Yield all |Element| objects returned by |XMLInterface.selections| and |XMLInterface.devices| without duplicates. land_dill land_lahn_1 stream_dill_lahn_2 stream_lahn_1_lahn_2 stream_lahn_2_lahn_3 """

        selections = copy.copy(self.selections)
        selections += self.devices
        elements = set()
        for selection in selections:
            for element in selection.elements:
                if element not in elements:
                    elements.add(element)
                    yield element