code: def _post_process_output(res):
      
      if isinstance(res, list):
          if len(res) == 0:
              return res
          elif len(res) == 1:
              return _post_process_output(res[0])
          elif isinstance(res[0], numpy.ndarray):
              return numpy.array(res)
          elif isinstance(res[0], dict):
              import pandas
              return pandas.DataFrame(res).values
          else:
              ls = [len(r) for r in res]
              mi = min(ls)
              if mi != max(ls):
                  raise NotImplementedError("Unable to postprocess various number of outputs in [{0}, {1}]".format(min(ls), max(ls)))
              if mi > 1:
                  output = []
                  for i in range(mi):
                      output.append(_post_process_output([r[i] for r in res]))
                  return output
              elif isinstance(res[0], list):
                  # list of lists
                  if isinstance(res[0][0], list):
                      return numpy.array(res)
                  elif len(res[0]) == 1 and isinstance(res[0][0], dict):
                      return _post_process_output([r[0] for r in res])
                  elif len(res) == 1:
                      return res
                  else:
                      if len(res[0]) != 1:
                          raise NotImplementedError("Not conversion implemented for {0}".format(res))
                      st = [r[0] for r in res]
                      return numpy.vstack(st)
              else:
                  return res
      else:
          return res
docs: Applies post processings before running the comparison
      such as changing type from list to arrays.