<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_user(self, user, id_type=None):
 """ Retrieve a user by their ID. `id_type` denotes which endpoint to try as there are several different IDs that can pull the same user record from Canvas. Refer to API documentation's `User <https://canvas.instructure.com/doc/api/users.html#User>`_ example to see the ID types a user can be retrieved with. :calls: `GET /api/v1/users/:id \ <https://canvas.instructure.com/doc/api/users.html#method.users.api_show>`_ :param user: The user's object or ID. :type user: :class:`canvasapi.user.User` or int :param id_type: The ID type. :type id_type: str :rtype: :class:`canvasapi.user.User` """

        if id_type:
            uri = 'users/{}:{}'.format(id_type, user)
        elif user == 'self':
            uri = 'users/self'
        else:
            user_id = obj_or_id(user, "user", (User,))
            uri = 'users/{}'.format(user_id)

        response = self.__requester.request(
            'GET',
            uri
        )
        return User(self.__requester, response.json())