code: def test_cancel(self):
      blotter = Blotter("daily")
  
      oid_1 = blotter.order(self.asset_24, 100, MarketOrder())
      oid_2 = blotter.order(self.asset_24, 200, MarketOrder())
      oid_3 = blotter.order(self.asset_24, 300, MarketOrder())
  
      # Create an order for another asset to verify that we don't remove it
      # when we do cancel_all on 24.
      blotter.order(self.asset_25, 150, MarketOrder())
  
      self.assertEqual(len(blotter.open_orders), 2)
      self.assertEqual(len(blotter.open_orders[self.asset_24]), 3)
      self.assertEqual(
          [o.amount for o in blotter.open_orders[self.asset_24]],
          [100, 200, 300],
      )
  
      blotter.cancel(oid_2)
      self.assertEqual(len(blotter.open_orders), 2)
      self.assertEqual(len(blotter.open_orders[self.asset_24]), 2)
      self.assertEqual(
          [o.amount for o in blotter.open_orders[self.asset_24]],
          [100, 300],
      )
      self.assertEqual(
          [o.id for o in blotter.open_orders[self.asset_24]],
          [oid_1, oid_3],
      )
  
      blotter.cancel_all_orders_for_asset(self.asset_24)
      self.assertEqual(len(blotter.open_orders), 1)
      self.assertEqual(list(blotter.open_orders), [self.asset_25])
  
imports: from nose_parameterized import parameterized
  import pandas
  from catalyst.assets import Equity
  from catalyst.finance.blotter import Blotter
  from catalyst.finance.cancel_policy import EODCancel, NeverCancel
  from catalyst.finance.commission import PerTrade
  from catalyst.finance.execution import LimitOrder, MarketOrder, StopLimitOrder, StopOrder
  from catalyst.finance.order import ORDER_STATUS, Order
  from catalyst.finance.slippage import DEFAULT_EQUITY_VOLUME_SLIPPAGE_BAR_LIMIT, FixedSlippage
  from catalyst.gens.sim_engine import BAR, SESSION_END
  from catalyst.testing.fixtures import WithCreateBarData, WithDataPortal, WithLogger, WithSimParams, CatalystTestCase
  from catalyst.utils.classproperty import classproperty
label_desc: Use image node_id 6 for calling the BlotterTestCase obj's underlying member method code with example usage: obj.test_cancel() without return types