code: def __init__(self, model: BaseModel, dataset: Dataset) -> None:
      self.model = model
      self.dataset = dataset
      pred_scores = self.model.predict(dataset)
      if isinstance(pred_scores, pd.DataFrame):
          pred_scores = pred_scores.iloc[:, 0]
      super().__init__(pred_scores)
  
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 1 to create a new ModelSignal object from inherited base classes: SignalWCache with example: obj = ModelSignal(model, dataset)