code: def make_tree_info(
      task_info: TaskInfo,
      indent: str,
      last: bool,
      details: bool,
      abbr: bool,
      visited_tasks: Set[str],
  ):
      result = "\n" + indent
      if last:
          result += "└─-"
          indent += "   "
      else:
          result += "|--"
          indent += "|  "
      result += task_info.get_task_title()
  
      if abbr:
          task_id = task_info.get_task_id()
          if task_id not in visited_tasks:
              visited_tasks.add(task_id)
          else:
              result += f"\n{indent}└─- ..."
              return result
  
      if details:
          result += task_info.get_task_detail()
  
      children = task_info.children_task_infos
      for index, child in enumerate(children):
          result += make_tree_info(
              child,
              indent,
              (index + 1) == len(children),
              details=details,
              abbr=abbr,
              visited_tasks=visited_tasks,
          )
      return result
  
file_path: gokart/gokart/tree/task_info_formatter.py
imports: import typing
  import warnings
  from dataclasses import dataclass
  from typing import Dict, List, NamedTuple, Optional, Set, Union
  import luigi
  from gokart.task import TaskOnKart
label_desc: Use image node_id 3 for calling a global function with example usage: make_tree_info(task_info, indent, last, details, abbr, visited_tasks) and returns: result, result