code: function extract_program_stats(prog) {
      var stats = {};
      var sources_array = source_stats(prog);
  
      stats.inputs = input_stats(prog);
      stats.input_total = count_procs(stats.inputs);
      stats.sources = sources_array;
      stats.source_total = sources_array.length;
      stats.reducers = reducer_stats(prog);
      stats.reducer_total = count_procs(stats.reducers);
      stats.functions = function_stats(prog);
      stats.procs = proc_stats(prog);
      stats.proc_total = count_procs(stats.procs);
      stats.views = view_stats(prog);
      stats.view_total = count_procs(stats.views);
      stats.subs = sub_stats(prog);
      stats.imports = import_stats(prog);
      return stats;
  }
docs: Call this with a Program object