<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_variants(self):
 """Iterate over the variants within this package, in index order. Returns: `Variant` iterator. """

        for variant in self.repository.iter_variants(self.resource):
            yield Variant(variant, context=self.context, parent=self)