<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unique_prefixes(context):
 """Return a dictionary with unique prefixes for modules in `context`. Keys are 'module' statements and values are prefixes, disambiguated where necessary. """

    res = {}
    for m in context.modules.values():
        if m.keyword == "submodule": continue
        prf = new = m.i_prefix
        suff = 0
        while new in res.values():
            suff += 1
            new = "%s%x" % (prf, suff)
        res[m] = new
    return res