<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def iter_relation(self, relation, **kwargs):
 """ Generic method to iterate relation from any resource. Query the client with the object's known parameters and try to retrieve the provided relation type. This is not meant to be used directly by a client, it's more a helper method for the child objects. """

        # pylint: disable=E1101
        index = 0
        while 1:
            items = self.get_relation(relation, index=index, **kwargs)
            for item in items:
                yield (item)

            if len(items) == 0:
                break
            index += len(items)