code: def _check_cats(cats, vtypes, df, prep, callers):
      
      out = []
      for cat in cats:
          all_vals = []
          for vtype in vtypes:
              vals, labels, maxval = _get_chart_info(df, vtype, cat, prep, callers)
              all_vals.extend(vals)
          if sum(all_vals) / float(len(all_vals)) > 2:
              out.append(cat)
      if len(out) == 0:
          return cats
      else:
          return out
docs: Only include categories in the final output if they have values.