<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_site_by_id(self, id):
 """ Looks up a site by ID and returns a TSquareSite representing that object, or throws an exception if no such site is found. @param id - The entityID of the site to look up @returns A TSquareSite object """

        response = self._session.get(BASE_URL_TSQUARE + '/site/{}.json'.format(id))
        response.raise_for_status()
        site_data = response.json()
        return TSquareSite(**site_data)