code: def create_signal_from(
      obj: Union[
          Signal,
          Tuple[BaseModel, Dataset],
          List,
          Dict,
          Text,
          pd.Series,
          pd.DataFrame,
      ],
  ) -> Signal:
      """
      create signal from diverse information
      This method will choose the right method to create a signal based on `obj`
      Please refer to the code below.
      """
      if isinstance(obj, Signal):
          return obj
      elif isinstance(obj, (tuple, list)):
          return ModelSignal(*obj)
      elif isinstance(obj, (dict, str)):
          return init_instance_by_config(obj)
      elif isinstance(obj, (pd.DataFrame, pd.Series)):
          return SignalWCache(signal=obj)
      else:
          raise NotImplementedError(
              f"This type of signal is not supported"
          )
  
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 for calling a global function with example usage: create_signal_from(obj) and returns: obj, ModelSignal, init_instance_by_config, SignalWCache