<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_item(self, item_id, expand=False):
 """Returns Hacker News `Item` object. Fetches the data from url: https://hacker-news.firebaseio.com/v0/item/<item_id>.json e.g. https://hacker-news.firebaseio.com/v0/item/69696969.json Args: item_id (int or string):
 Unique item id of Hacker News story, comment etc. expand (bool):
 expand (bool):
 Flag to indicate whether to transform all IDs into objects. Returns: `Item` object representing Hacker News item. Raises: InvalidItemID: If corresponding Hacker News story does not exist. """

        url = urljoin(self.item_url, F"{item_id}.json")
        response = self._get_sync(url)

        if not response:
            raise InvalidItemID

        item = Item(response)
        if expand:
            item.by = self.get_user(item.by)
            item.kids = self.get_items_by_ids(item.kids) if item.kids else None
            item.parent = self.get_item(item.parent) if item.parent else None
            item.poll = self.get_item(item.poll) if item.poll else None
            item.parts = (
                self.get_items_by_ids(item.parts) if item.parts else None
            )

        return item