faculty this code to  function, to use in report -> https://github.com/allegro/ralph/blob/master/src/ralph/ui/views/reports.py#L841