code: def get_workload(outs, task_name=None):
      """Retrieve the workload from outputs"""
      visited = set()
  
      def traverse(tensors):
          """traverse all ops to find attached workload"""
          for t in tensors:
              op = t.op
              if op in visited:
                  continue
              visited.add(op)
              wkl = traverse(op.input_tensors)
              if wkl is not None:
                  return wkl
  
              if "workload" in op.attrs:
                  ret = args_to_workload(op.attrs["workload"])
                  if task_name is None or ret[0] == task_name:
                      return ret
          return None
  
      outs = [outs] if isinstance(outs, tensor.Tensor) else outs
      return traverse(outs)
  
file_path: tvm/python/tvm/autotvm/task/topi_integration.py
imports: import functools
  import tvm.te._ffi_api
  from tvm.target import Target
  from tvm.te import tensor
  from .task import args_to_workload, serialize_args, DispatchContext, _register_task_compute, _register_task_schedule
label_desc: Use image node_id 3 for calling a global function with example usage: get_workload(outs, task_name) and returns: traverse, None, wkl, ret