def get_user(self, user, id_type=None):
if id_type:<EOL><INDENT>uri = '<STR_LIT>'.format(id_type, user)<EOL><DEDENT>elif user == '<STR_LIT>':<EOL><INDENT>uri = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>user_id = obj_or_id(user, "<STR_LIT:user>", (User,))<EOL>uri = '<STR_LIT>'.format(user_id)<EOL><DEDENT>response = self.__requester.request(<EOL>'<STR_LIT:GET>',<EOL>uri<EOL>)<EOL>return User(self.__requester, response.json())<EOL>
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`