def resolve(self):
<EOL>if self.__class__ is not UserGroup:<EOL><INDENT>return self<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>return self._swimlane.users.get(id=self.id)<EOL><DEDENT>except ValueError:<EOL><INDENT>return self._swimlane.groups.get(id=self.id)<EOL><DEDENT><DEDENT>
Retrieve and return correct User or Group instance from UserGroup

        .. versionadded:: 2.16.1

        Returns:
            User | Group: Resolved User or Group instance