code: def test_str(mock_exchange_class):
      exchange = mock_exchange_class.return_value
      exchange.options = ExchangeOptions()
      exchange.id = "fake_exchange_id"
      exchange.name = "bitfinex"
      exchange.clock = mock.Mock()
      exchange.clock.step = 0
      exchange.quote_price = mock.Mock(return_value=Decimal(7000.00))
  
      order_spec = OrderSpec(
          side=TradeSide.BUY,
          trade_type=TradeType.MARKET,
          exchange_pair=ExchangePair(exchange, USD / BTC),
      )
  
      pattern = re.compile(
          "<[A-Z][a-zA-Z]*:\\s(\\w+=.*,\\s)*(\\w+=.*)>"
      )
  
      string = str(order_spec)
      assert string
  
      assert string == pattern.fullmatch(string).string
  
file_path: tensortrade/tests/tensortrade/unit/oms/orders/test_order_spec.py
imports: import re
  import unittest.mock
  from decimal import Decimal
  from tensortrade.oms.orders import OrderSpec, TradeSide, TradeType
  from tensortrade.oms.exchanges import ExchangeOptions
  from tensortrade.oms.instruments import USD, BTC, ExchangePair
  from tensortrade.oms.wallets import Portfolio, Wallet
label_desc: Use image node_id 5 for calling a global function with example usage: test_str(mock_exchange_class) without return types