class_docstr: Calculates a commission for a transaction based on a per dollar cost.
  
  Parameters
  ----------
  cost : float
      The flat amount of commissions paid per dollar of equities traded.
class_docstr_tok: ["Calculates","a","commission","for","a","transaction","based","on","a","per","dollar","cost",".","Parameters","--","--","--","--","--","cost",":","float","The","flat","amount","of","commissions","paid","per","dollar","of","equities","traded","."]
docstr: Pay commission based on dollar value of shares.
docstr_tok: ["Pay","commission","based","on","dollar","value","of","shares","."]
code: def calculate(self, order, transaction):
      """
      Pay commission based on dollar value of shares.
      """
      cost_per_share = transaction.price * self.cost_per_dollar
      return abs(transaction.amount) * cost_per_share
  
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 PerDollar obj's underlying member method code with example usage: obj.calculate(order, transaction) and returns: unknown