code: def _load_internal(self, instrument, start_index, end_index, freq):
      _calendar = Cal.calendar(freq=freq)
      resample_data = np.empty(
          end_index - start_index + 1, dtype="float32"
      )
  
      for cur_index in range(start_index, end_index + 1):
          cur_time = _calendar[cur_index]
          # To load expression accurately, more historical data are required
          start_ws, end_ws = self.feature.get_extended_window_size()
          if end_ws > 0:
              raise ValueError(
                  "PIT database does not support referring to future period (e.g. expressions like `Ref('$$roewa_q', -1)` are not supported"
              )
  
          # The calculated value will always the last element, so the end_offset is zero.
          try:
              s = self._load_feature(instrument, -start_ws, 0, cur_time)
              resample_data[cur_index - start_index] = (
                  s.iloc[-1] if len(s) > 0 else np.nan
              )
          except FileNotFoundError:
              get_module_logger("base").warning(
                  f"WARN: period data not found for {str(self)}"
              )
              return pd.Series(dtype="float32", name=str(self))
  
      resample_series = pd.Series(
          resample_data,
          index=pd.RangeIndex(start_index, end_index + 1),
          dtype="float32",
          name=str(self),
      )
      return resample_series
  
file_path: qlib/qlib/data/pit.py
imports: import numpy
  import pandas
  from qlib.data.ops import ElemOperator
  from qlib.log import get_module_logger
  from .data import Cal
label_desc: Use image node_id 1 for calling the P obj's underlying member method code with example usage: obj._load_internal(instrument, start_index, end_index, freq) and returns: resample_series, pd