def print_tree(task, indent='', last=True):
 with warnings.catch_warnings():
  warnings.filterwarnings(action='ignore', message='Task .* without outputs has no custom complete\\(\\) method')
  is_task_complete = task.complete()
 is_complete = (((bcolors.OKGREEN + 'COMPLETE') if is_task_complete else (bcolors.OKBLUE + 'PENDING')) + bcolors.ENDC)
 name = task.__class__.__name__
 params = task.to_str_params(only_significant=True)
 result = ('\n' + indent)
 if last:
  result += '\xe2\x94\x94\xe2\x94\x80--'
  indent += '   '
 else:
  result += '|--'
  indent += '|  '
 result += '[{0}-{1} ({2})]'.format(name, params, is_complete)
 children = flatten(task.requires())
 for (index, child) in enumerate(children):
  result += print_tree(child, indent, ((index + 1) == len(children)))
 return result

def print_tree ( task , indent = '' , last = True ) : with warnings . catch_warnings ( ) : warnings . filterwarnings ( action = 'ignore' , message = 'Task .* without outputs has no custom complete\\(\\) method' ) is_task_complete = task . complete ( ) is_complete = ( ( ( bcolors . OKGREEN + 'COMPLETE' ) if is_task_complete else ( bcolors . OKBLUE + 'PENDING' ) ) + bcolors . ENDC ) name = task . __class__ . __name__ params = task . to_str_params ( only_significant = True ) result = ( '\n' + indent ) if last : result += '\xe2\x94\x94\xe2\x94\x80--' indent += '   ' else : result += '|--' indent += '|  ' result += '[{0}-{1} ({2})]' . format ( name , params , is_complete ) children = flatten ( task . requires ( ) ) for ( index , child ) in enumerate ( children ) : result += print_tree ( child , indent , ( ( index + 1 ) == len ( children ) ) ) return result
return a string representation of the tasks .