code: def check_futures():
      commission = 0.5
      margin = 10.0
      mult = 10.0
      comm = bt.CommissionInfo(
          commission=commission, mult=mult, margin=margin
      )
  
      price = 10.0
      cash = 10000.0
      size = 100.0
  
      opcost = comm.getoperationcost(size=size, price=price)
      assert opcost == size * margin
  
      pos = Position(size=size, price=price)
      value = comm.getvalue(pos, price)
      assert value == size * margin
  
      commcost = comm.getcommission(size, price)
      assert commcost == size * commission
  
      newprice = 5.0
      pnl = comm.profitandloss(pos.size, pos.price, newprice)
      assert pnl == pos.size * (newprice - price) * mult
  
      ca = comm.cashadjust(size, price, newprice)
      assert ca == size * (newprice - price) * mult
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import testcommon
  import backtrader
  from backtrader import CommissionInfo, Position
label_desc: Use image node_id 2 for calling a global function with example usage: check_futures() without return types