docstr: Update account at 'date'.
  
  Parameters
  ----------
  date : str (YYYY-MM-DD)
      Trade date, that the generated order list will be traded.
  path : str
      Path to save user account.
  type : str
      which executor was been used to execute the order list
      'SIM': SimulatorExecutor()
docstr_tok: ["Update","account","at","'date","'",".","Parameters","--","--","--","--","--","date",":","str","(","YYYY-MM-DD",")","Trade","date",",","that","the","generated","order","list","will","be","traded",".","path",":","str","Path","to","save","user","account",".","type",":","str","which","executor","was","been","used","to","execute","the","order","list","'SIM","'",":","SimulatorExecutor","(",")"]
code: def update(self, date, path, type="SIM"):
      """Update account at 'date'.
  
      Parameters
      ----------
      date : str (YYYY-MM-DD)
          Trade date, that the generated order list will be traded.
      path : str
          Path to save user account.
      type : str
          which executor was been used to execute the order list
          'SIM': SimulatorExecutor()
      """
      if type not in ["SIM", "YC"]:
          raise ValueError("type is invalid, {}".format(type))
      um, pred_date, trade_date = self.init(self.client, path, date)
      for user_id, user in um.users.items():
          dates, trade_exchange = prepare(um, trade_date, user_id)
          if type == "SIM":
              executor = SimulatorExecutor(
                  trade_exchange=trade_exchange
              )
          else:
              raise ValueError("not found executor")
          # dates[0] is the last_trading_date
          if str(dates[0].date()) > str(pred_date.date()):
              raise ValueError(
                  "The account data is not newest! last trading date {}, today {}".format(
                      dates[0].date(), trade_date.date()
                  )
              )
          # load trade info and update account
          trade_info = executor.load_trade_info_from_executed_file(
              user_path=(pathlib.Path(path) / user_id),
              trade_date=trade_date,
          )
          score_series = load_score_series(
              (pathlib.Path(path) / user_id), trade_date
          )
          update_account(
              user.account, trade_info, trade_exchange, trade_date
          )
  
          portfolio_metrics = (
              user.account.portfolio_metrics.generate_portfolio_metrics_dataframe()
          )
          self.logger.info(portfolio_metrics)
          um.save_user_data(user_id)
          self.logger.info(
              "Update account state {} for {}".format(
                  trade_date, user_id
              )
          )
  
imports: import fire
  import pandas
  import pathlib
  import qlib
  import logging
  from ...data import D
  from ...log import get_module_logger
  from ...utils import get_pre_trading_date, is_tradable_date
  from ..evaluate import risk_analysis
  from ..backtest.backtest import update_account
  from .manager import UserManager
  from .utils import prepare
  from .utils import create_user_folder
  from .executor import load_order_list, save_order_list
  from .executor import SimulatorExecutor
  from .executor import save_score_series, load_score_series
label_desc: Use image node_id 7 for calling the Operator obj's underlying member method code with example usage: obj.update(date, path, type) without return types