class_docstr: A discrete action scheme that determines actions based on managing risk,
     through setting a follow-up stop loss and take profit on every order.
  
  Parameters
  ----------
  stop : List[float]
      A list of possible stop loss percentages for each order.
  take : List[float]
      A list of possible take profit percentages for each order.
  trade_sizes : List[float]
      A list of trade sizes to select from when submitting an order.
      (e.g. '[1, 1/3]' = 100% or 33% of balance is tradable.
      '4' = 25%, 50%, 75%, or 100% of balance is tradable.)
  durations : List[int]
      A list of durations to select from when submitting an order.
  trade_type : `TradeType`
      A type of trade to make.
  order_listener : OrderListener
      A callback class to use for listening to steps of the order process.
  min_order_pct : float
      The minimum value when placing an order, calculated in percent over net_worth.
  min_order_abs : float
      The minimum value when placing an order, calculated in absolute order value.
class_docstr_tok: ["A","discrete","action","scheme","that","determines","actions","based","on","managing","risk",",","through","setting","a","follow-up","stop","loss","and","take","profit","on","every","order",".","Parameters","--","--","--","--","--","stop",":","List","[","float","]","A","list","of","possible","stop","loss","percentages","for","each","order",".","take",":","List","[","float","]","A","list","of","possible","take","profit","percentages","for","each","order",".","trade_sizes",":","List","[","float","]","A","list","of","trade","sizes","to","select","from","when","submitting","an","order",".","(","e.g",".","'","[","1",",","1\/3","]","'","=","100","%","or","33","%","of","balance","is","tradable",".","'","4","'","=","25","%",",","50","%",",","75","%",",","or","100","%","of","balance","is","tradable",".",")","durations",":","List","[","int","]","A","list","of","durations","to","select","from","when","submitting","an","order",".","trade_type",":","`","TradeType","`","A","type","of","trade","to","make",".","order_listener",":","OrderListener","A","callback","class","to","use","for","listening","to","steps","of","the","order","process",".","min_order_pct",":","float","The","minimum","value","when","placing","an","order",",","calculated","in","percent","over","net_worth",".","min_order_abs",":","float","The","minimum","value","when","placing","an","order",",","calculated","in","absolute","order","value","."]
code: def action_space(self) -> "Space":
      if not self._action_space:
          self.actions = product(
              self.stop,
              self.take,
              self.trade_sizes,
              self.durations,
              [TradeSide.BUY, TradeSide.SELL],
          )
          self.actions = list(self.actions)
          self.actions = list(
              product(self.portfolio.exchange_pairs, self.actions)
          )
          self.actions = [None] + self.actions
  
          self._action_space = Discrete(len(self.actions))
      return self._action_space
  
imports: import logging
  from abc import abstractmethod
  from itertools import product
  from typing import Union, List, Any
  from gym.spaces import Space, Discrete
  from tensortrade.core import Clock
  from tensortrade.env.generic import ActionScheme, TradingEnv
  from tensortrade.oms.instruments import ExchangePair
  from tensortrade.oms.orders import Broker, Order, OrderListener, OrderSpec, proportion_order, risk_managed_order, TradeSide, TradeType
  from tensortrade.oms.wallets import Portfolio
label_desc: Use image node_id 2 for calling the ManagedRiskOrders obj's underlying member method code with example usage: obj.action_space() and returns: self