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_state_from_order(
      self,
      order: Order,
      trade_val: float,
      cost: float,
      trade_price: float,
  ) -> None:
      if self.is_port_metr_enabled():
          # update turnover
          self.accum_info.add_turnover(trade_val)
          # update cost
          self.accum_info.add_cost(cost)
  
          # update return from order
          trade_amount = trade_val / trade_price
          if order.direction == Order.SELL:  # 0 for sell
              # when sell stock, get profit from price change
              profit = (
                  trade_val
                  - self.current_position.get_stock_price(
                      order.stock_id
                  )
                  * trade_amount
              )
              self.accum_info.add_return_value(
                  profit
              )  # note here do not consider cost
  
          elif order.direction == Order.BUY:  # 1 for buy
              # when buy stock, we get return for the rtn computing method
              # profit in buy order is to make rtn is consistent with earning at the end of bar
              profit = (
                  self.current_position.get_stock_price(order.stock_id)
                  * trade_amount
                  - trade_val
              )
              self.accum_info.add_return_value(profit)
  
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 8 for calling the Account obj's underlying member method code with example usage: obj._update_state_from_order(order, trade_val, cost, trade_price) without return types