code: def get_machine_usage(machine, start, end):
      
  
      try:
          cache = MachineCache.objects.get(
              machine=machine, date=datetime.date.today(),
              start=start, end=end)
          return cache.cpu_time, cache.no_jobs
      except MachineCache.DoesNotExist:
          return 0, 0
docs: Return a tuple of cpu hours and number of jobs for a machine
      for a given period
  
      Keyword arguments:
      machine --
      start -- start date
      end -- end date