code: def _get_all_tasks(
      task: gokart.TaskOnKart,
  ) -> List[gokart.TaskOnKart]:
      return luigi.task.flatten(
          [
              _get_all_tasks(o)
              for o in luigi.task.flatten(task.requires())
              if isinstance(o, gokart.TaskOnKart)
          ]
          + [task]
      )
  
file_path: gokart/gokart/testing/check_if_run_with_empty_data_frame.py
imports: import logging
  import sys
  from typing import List, Optional
  import luigi
  import pandas
  from luigi.cmdline_parser import CmdlineParser
  import gokart
label_desc: Use image node_id 1 for calling a global function with example usage: _get_all_tasks(task) and returns: luigi