code: def output_result(self):
          
          output = {}
          output['draw'] = str(int(self.params.get('draw', 1)))
          output['recordsTotal'] = str(self.cardinality)
          output['recordsFiltered'] = str(self.cardinality_filtered)
          if self.error:
              output['error'] = self.error
              return output
  
          output['data'] = self.results
          for k, v in self.yadcf_params:
              output[k] = v
          return output
docs: Output results in the format needed by DataTables.