code: def get_task_history(last_task):
      
      if hasattr(last_task, 'branch') and last_task.branch:
          return
      elif hasattr(last_task, 'hide') and last_task.hide:
          return
      else:
          return get_func_info(last_task)
docs: Append last task to task history.