<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_items_by_ids(self, item_ids, item_type=None):
 """Given a list of item ids, return all the Item objects Args: item_ids (obj):
 List of item IDs to query item_type (str):
 (optional) Item type to filter results with Returns: List of `Item` objects for given item IDs and given item type """

        urls = [urljoin(self.item_url, F"{i}.json") for i in item_ids]
        result = self._run_async(urls=urls)
        items = [Item(r) for r in result if r]
        if item_type:
            return [item for item in items if item.item_type == item_type]
        else:
            return items