class_docstr: The correctness of the metrics of Account in nested execution depends on the shallow copy of `trade_account` in
  qlib/backtest/executor.py:NestedExecutor
  Different level of executor has different Account object when calculating metrics. But the position object is
  shared cross all the Account object.
code: def update_order(
      self,
      order: Order,
      trade_val: float,
      cost: float,
      trade_price: float,
  ) -> None:
      if self.current_position.skip_update():
          # TODO: supporting polymorphism for account
          # updating order for infinite position is meaningless
          return
  
      # if stock is sold out, no stock price information in Position, then we should update account first,
      # then update current position
      # if stock is bought, there is no stock in current position, update current, then update account
      # The cost will be subtracted from the cash at last. So the trading logic can ignore the cost calculation
      if order.direction == Order.SELL:
          # sell stock
          self._update_state_from_order(
              order, trade_val, cost, trade_price
          )
          # update current position
          # for may sell all of stock_id
          self.current_position.update_order(
              order, trade_val, cost, trade_price
          )
      else:
          # buy stock
          # deal order, then update state
          self.current_position.update_order(
              order, trade_val, cost, trade_price
          )
          self._update_state_from_order(
              order, trade_val, cost, trade_price
          )
  
imports: from __future__ import annotations
  import copy
  from typing import Dict, List, Optional, Tuple, cast
  import pandas
  from qlib.utils import init_instance_by_config
  from .decision import BaseTradeDecision, Order
  from .exchange import Exchange
  from .high_performance_ds import BaseOrderIndicator
  from .position import BasePosition
  from .report import Indicator, PortfolioMetrics
label_desc: Use image node_id 9 for calling the Account obj's underlying member method code with example usage: obj.update_order(order, trade_val, cost, trade_price) without return types