<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resolution(self, index):
 """Resolution with a given index. Parameters index : int Resolution index. Global if this is the ``aionationstates.wa`` object, local if this is ``aionationstates.ga`` or ``aionationstates.sc``. Returns ------- :class:`ApiQuery` of :class:`Resolution` Raises ------ :class:`NotFound` If a resolution with the requested index doesn't exist. """

        @api_query('resolution', id=str(index))
        async def result(_, root):
            elem = root.find('RESOLUTION')
            if not elem:
                raise NotFound(f'No resolution found with index {index}')
            return Resolution(elem)
        return result(self)