code: def test_per_share_with_minimum(self):
      # minimum hit by first trade
      results = self.get_results(
          self.code.format(
              commission="set_commission(commission.PerShare(0.05, 3))",
              sid=133,
              amount=300,
          )
      )
  
      # commissions should be 5, 10, 15
      for i, orders in enumerate(results.orders[1:4]):
          self.assertEqual((i + 1) * 5, orders[0]["commission"])
  
      self.verify_capital_used(results, [-1005, -1005, -1005])
  
      # minimum hit by second trade
      results = self.get_results(
          self.code.format(
              commission="set_commission(commission.PerShare(0.05, 8))",
              sid=133,
              amount=300,
          )
      )
  
      # commissions should be 8, 10, 15
      self.assertEqual(8, results.orders[1][0]["commission"])
      self.assertEqual(10, results.orders[2][0]["commission"])
      self.assertEqual(15, results.orders[3][0]["commission"])
  
      self.verify_capital_used(results, [-1008, -1002, -1005])
  
      # minimum hit by third trade
      results = self.get_results(
          self.code.format(
              commission="set_commission(commission.PerShare(0.05, 12))",
              sid=133,
              amount=300,
          )
      )
  
      # commissions should be 12, 12, 15
      self.assertEqual(12, results.orders[1][0]["commission"])
      self.assertEqual(12, results.orders[2][0]["commission"])
      self.assertEqual(15, results.orders[3][0]["commission"])
  
      self.verify_capital_used(results, [-1012, -1000, -1003])
  
      # minimum never hit
      results = self.get_results(
          self.code.format(
              commission="set_commission(commission.PerShare(0.05, 18))",
              sid=133,
              amount=300,
          )
      )
  
      # commissions should be 18, 18, 18
      self.assertEqual(18, results.orders[1][0]["commission"])
      self.assertEqual(18, results.orders[2][0]["commission"])
      self.assertEqual(18, results.orders[3][0]["commission"])
  
      self.verify_capital_used(results, [-1018, -1000, -1000])
  
imports: from textwrap import dedent
  from nose_parameterized import parameterized
  from pandas import DataFrame
  from zipline.assets import Equity, Future
  from zipline.errors import IncompatibleCommissionModel
  from zipline.finance.commission import CommissionModel, EquityCommissionModel, FutureCommissionModel, PerContract, PerDollar, PerFutureTrade, PerShare, PerTrade
  from zipline.finance.order import Order
  from zipline.finance.transaction import Transaction
  from zipline.testing import ZiplineTestCase
  from zipline.testing.fixtures import WithAssetFinder, WithMakeAlgo
label_desc: Use image node_id 7 for calling the CommissionAlgorithmTests obj's underlying member method code with example usage: obj.test_per_share_with_minimum() without return types