code: def get_quote_from_qlib(self) -> None:
      # get stock data from qlib
      if len(self.codes) == 0:
          self.codes = D.instruments()
      self.quote_df = D.features(
          self.codes,
          self.all_fields,
          self.start_time,
          self.end_time,
          freq=self.freq,
          disk_cache=True,
      )
      self.quote_df.columns = self.all_fields
  
      # check buy_price data and sell_price data
      for attr in ("buy_price", "sell_price"):
          pstr = getattr(self, attr)  # price string
          if self.quote_df[pstr].isna().any():
              self.logger.warning(
                  "{} field data contains nan.".format(pstr)
              )
  
      # update trade_w_adj_price
      if (
          self.quote_df["$factor"].isna()
          & ~self.quote_df["$close"].isna()
      ).any():
          # The 'factor.day.bin' file not exists, and `factor` field contains `nan`
          # Use adjusted price
          self.trade_w_adj_price = True
          self.logger.warning(
              "factor.day.bin file not exists or factor contains `nan`. Order using adjusted_price."
          )
          if self.trade_unit is not None:
              self.logger.warning(
                  f"trade unit {self.trade_unit} is not supported in adjusted_price mode."
              )
      else:
          # The `factor.day.bin` file exists and all data `close` and `factor` are not `nan`
          # Use normal price
          self.trade_w_adj_price = False
      # update limit
      self._update_limit(self.limit_threshold)
  
      # concat extra_quote
      if self.extra_quote is not None:
          # process extra_quote
          if "$close" not in self.extra_quote:
              raise ValueError("$close is necessray in extra_quote")
          for attr in "buy_price", "sell_price":
              pstr = getattr(self, attr)  # price string
              if pstr not in self.extra_quote.columns:
                  self.extra_quote[pstr] = self.extra_quote["$close"]
                  self.logger.warning(
                      f"No {pstr} set for extra_quote. Use $close as {pstr}."
                  )
          if "$factor" not in self.extra_quote.columns:
              self.extra_quote["$factor"] = 1.0
              self.logger.warning(
                  "No $factor set for extra_quote. Use 1.0 as $factor."
              )
          if "limit_sell" not in self.extra_quote.columns:
              self.extra_quote["limit_sell"] = False
              self.logger.warning(
                  "No limit_sell set for extra_quote. All stock will be able to be sold."
              )
          if "limit_buy" not in self.extra_quote.columns:
              self.extra_quote["limit_buy"] = False
              self.logger.warning(
                  "No limit_buy set for extra_quote. All stock will be able to be bought."
              )
          assert set(self.extra_quote.columns) == set(
              self.quote_df.columns
          ) - {"$change"}
          self.quote_df = pd.concat(
              [self.quote_df, self.extra_quote], sort=False, axis=0
          )
  
imports: from __future__ import annotations
  from collections import defaultdict
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type, Union, cast
  from ..utils.index_data import IndexData
  import random
  import numpy
  import pandas
  from qlib.backtest.position import BasePosition
  from ..config import C
  from ..constant import REG_CN, REG_TW
  from ..data.data import D
  from ..log import get_module_logger
  from .decision import Order, OrderDir, OrderHelper
  from .high_performance_ds import BaseQuote, NumpyQuote
label_desc: Use image node_id 2 for calling the Exchange obj's underlying member method code with example usage: obj.get_quote_from_qlib() without return types