<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_stock_to_class(self, assetclass_id: int, symbol: str):
 """ Add a stock link to an asset class """

        assert isinstance(symbol, str)
        assert isinstance(assetclass_id, int)

        item = AssetClassStock()
        item.assetclassid = assetclass_id
        item.symbol = symbol

        session = self.open_session()
        session.add(item)
        self.save()

        return item