<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def yang_modules(self):
 """ Return a list of advertised YANG module names with revisions. Avoid repeated modules. """

        res = {}
        for c in self.capabilities:
            m = c.parameters.get("module")
            if m is None or m in res: continue
            res[m] = c.parameters.get("revision")
        return res.items()