<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_admin(self):
 """ Check that the user has a role with the code 'admin' """

        for ur in self.roleusers:
            if ur.role.code == 'admin':
                return True

        return False