code: def _update_limit(
      self, limit_threshold: Union[Tuple, float, None]
  ) -> None:
      # $close may contain NaN, the nan indicates that the stock is not tradable at that timestamp
      suspended = self.quote_df["$close"].isna()
      # check limit_threshold
      limit_type = self._get_limit_type(limit_threshold)
      if limit_type == self.LT_NONE:
          self.quote_df["limit_buy"] = suspended
          self.quote_df["limit_sell"] = suspended
      elif limit_type == self.LT_TP_EXP:
          # set limit
          limit_threshold = cast(tuple, limit_threshold)
          # astype bool is necessary, because quote_df is an expression and could be float
          self.quote_df["limit_buy"] = (
              self.quote_df[limit_threshold[0]].astype("bool")
              | suspended
          )
          self.quote_df["limit_sell"] = (
              self.quote_df[limit_threshold[1]].astype("bool")
              | suspended
          )
      elif limit_type == self.LT_FLT:
          limit_threshold = cast(float, limit_threshold)
          self.quote_df["limit_buy"] = (
              self.quote_df["$change"].ge(limit_threshold) | suspended
          )
          self.quote_df["limit_sell"] = (
              self.quote_df["$change"].le(-limit_threshold) | suspended
          )
  
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 4 for calling the Exchange obj's underlying member method code with example usage: obj._update_limit(limit_threshold) without return types