<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_role(self, id=None, name=None):
 """ Get role object by name or id. """

        log.info("Picking role: %s (%s)" % (name, id))
        return self.roles[id or name]