class_docstr: Calculates a commission for a transaction based on a per share cost with
  an optional minimum cost per trade.
  
  Parameters
  ----------
  cost : float, optional
      The amount of commissions paid per share traded.
  min_trade_cost : float, optional
      The minimum amount of commissions paid per trade.
class_docstr_tok: ["Calculates","a","commission","for","a","transaction","based","on","a","per","share","cost","with","an","optional","minimum","cost","per","trade",".","Parameters","--","--","--","--","--","cost",":","float",",","optional","The","amount","of","commissions","paid","per","share","traded",".","min_trade_cost",":","float",",","optional","The","minimum","amount","of","commissions","paid","per","trade","."]
code: def calculate(self, order, transaction):
      return calculate_per_unit_commission(
          order=order,
          transaction=transaction,
          cost_per_unit=self.cost_per_share,
          initial_commission=0,
          min_trade_cost=self.min_trade_cost,
      )
  
imports: from abc import abstractmethod
  from collections import defaultdict
  from six import with_metaclass
  from toolz import merge
  from catalyst.assets import Equity, Future
  from catalyst.finance.constants import FUTURE_EXCHANGE_FEES_BY_SYMBOL
  from catalyst.finance.shared import AllowedAssetMarker, FinancialModelMeta
  from catalyst.utils.dummy import DummyMapping
label_desc: Use image node_id 3 for calling the PerShare obj's underlying member method code with example usage: obj.calculate(order, transaction) and returns: calculate_per_unit_commission