<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def permits(self, identity, permission, context=None):
 """Check user permissions. Return True if the identity is allowed the permission in the current context, else return False. """

        # pylint: disable=unused-argument
        user = self.user_map.get(identity)
        if not user:
            return False
        return permission in user.permissions