class_docstr: Signal With pandas with based Cache
  SignalWCache will store the prepared signal as a attribute and give the according signal based on input query
class_docstr_tok: ["Signal","With","pandas","with","based","Cache","SignalWCache","will","store","the","prepared","signal","as","a","attribute","and","give","the","according","signal","based","on","input","query"]
code: def get_signal(
      self, start_time: pd.Timestamp, end_time: pd.Timestamp
  ) -> Union[pd.Series, pd.DataFrame]:
      # the frequency of the signal may not align with the decision frequency of strategy
      # so resampling from the data is necessary
      # the latest signal leverage more recent data and therefore is used in trading.
      signal = resam_ts_data(
          self.signal_cache,
          start_time=start_time,
          end_time=end_time,
          method="last",
      )
      return signal
  
file_path: qlib/qlib/backtest/signal.py
imports: import abc
  from typing import Dict, List, Text, Tuple, Union
  import pandas
  from qlib.utils import init_instance_by_config
  from ..data.dataset import Dataset
  from ..data.dataset.utils import convert_index_format
  from ..model.base import BaseModel
  from ..utils.resam import resam_ts_data
label_desc: Use image node_id 2 for calling the SignalWCache obj's underlying member method code with example usage: obj.get_signal(start_time, end_time) and returns: signal