code: def create_account_instance(
      start_time: Union[pd.Timestamp, str],
      end_time: Union[pd.Timestamp, str],
      benchmark: Optional[str],
      account: Union[float, int, dict],
      pos_type: str = "Position",
  ) -> Account:
      """
      # TODO: is very strange pass benchmark_config in the account (maybe for report)
      # There should be a post-step to process the report.
  
      Parameters
      ----------
      start_time
          start time of the benchmark
      end_time
          end time of the benchmark
      benchmark : str
          the benchmark for reporting
      account :   Union[
                      float,
                      {
                          "cash": float,
                          "stock1": Union[
                                          int,    # it is equal to {"amount": int}
                                          {"amount": int, "price"(optional): float},
                                    ]
                      },
                  ]
          information for describing how to creating the account
          For `float`:
              Using Account with only initial cash
          For `dict`:
              key "cash" means initial cash.
              key "stock1" means the information of first stock with amount and price(optional).
              ...
      pos_type: str
          Postion type.
      """
      if isinstance(account, (int, float)):
          init_cash = account
          position_dict = {}
      elif isinstance(account, dict):
          init_cash = account.pop("cash")
          position_dict = account
      else:
          raise ValueError("account must be in (int, float, dict)")
  
      return Account(
          init_cash=init_cash,
          position_dict=position_dict,
          pos_type=pos_type,
          benchmark_config={}
          if benchmark is None
          else {
              "benchmark": benchmark,
              "start_time": start_time,
              "end_time": end_time,
          },
      )
  
file_path: qlib/qlib/backtest/__init__.py
imports: from __future__ import annotations
  import copy
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Generator, List, Optional, Tuple, Union
  import pandas
  from .account import Account
  from ..config import C
  from ..log import get_module_logger
  from ..utils import init_instance_by_config
  from .backtest import INDICATOR_METRIC, PORT_METRIC, backtest_loop, collect_data_loop
  from .decision import Order
  from .exchange import Exchange
  from .utils import CommonInfrastructure
label_desc: Use image node_id 2 for calling a global function with example usage: create_account_instance(start_time, end_time, benchmark, account, pos_type) and returns: Account