class_docstr: OnlineStrategy is working with `Online Manager <#Online Manager>`_, responding to how the tasks are generated, the models are updated and signals are prepared.
class_docstr_tok: ["OnlineStrategy","is","working","with","`","Online","Manager","<","#","Online","Manager",">","`","_",",","responding","to","how","the","tasks","are","generated",",","the","models","are","updated","and","signals","are","prepared","."]
docstr: After the end of a routine, check whether we need to prepare and train some new tasks based on cur_time (None for latest)..
  Return the new tasks waiting for training.
  
  You can find the last online models by OnlineTool.online_models.
docstr_tok: ["After","the","end","of","a","routine",",","check","whether","we","need","to","prepare","and","train","some","new","tasks","based","on","cur_time","(","None","for","latest",")","..","Return","the","new","tasks","waiting","for","training",".","You","can","find","the","last","online","models","by","OnlineTool.online_models","."]
code: def prepare_tasks(self, cur_time, **kwargs) -> List[dict]:
      """
      After the end of a routine, check whether we need to prepare and train some new tasks based on cur_time (None for latest)..
      Return the new tasks waiting for training.
  
      You can find the last online models by OnlineTool.online_models.
      """
      raise NotImplementedError(
          f"Please implement the `prepare_tasks` method."
      )
  
imports: from typing import List, Union
  from qlib.log import get_module_logger
  from qlib.model.ens.group import RollingGroup
  from qlib.utils import transform_end_date
  from qlib.workflow.online.utils import OnlineTool, OnlineToolR
  from qlib.workflow.recorder import Recorder
  from qlib.workflow.task.collect import Collector, RecorderCollector
  from qlib.workflow.task.gen import RollingGen, task_generator
  from qlib.workflow.task.utils import TimeAdjuster
label_desc: Use image node_id 2 for calling the OnlineStrategy obj's underlying member method code with example usage: obj.prepare_tasks(cur_time) without return types