<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def items(self):
 """ Return all merged items as iterator """

        if not self.pdata and not self.spills:
            return iter(self.data.items())
        return self._external_items()