code: def humanise_seconds(seconds):
      
      days = seconds / (3600 * 24)
      day_modulus = seconds % (3600 * 24)
      hours = day_modulus / 3600
      hour_modulus = day_modulus % 3600
      minutes = hour_modulus / 60
  
      if seconds < 60:
          return tr('%i seconds' % seconds)
      if seconds < 120:
          return tr('a minute')
      if seconds < 3600:
          return tr('%s minutes' % minutes)
      if seconds < 7200:
          return tr('over an hour')
      if seconds < 86400:
          return tr('%i hours and %i minutes' % (hours, minutes))
      else:
          # If all else fails...
          return tr('%i days, %i hours and %i minutes' % (
              days, hours, minutes))
docs: Utility function to humanise seconds value into e.g. 10 seconds ago.
  
      The function will try to make a nice phrase of the seconds count
      provided.
  
      .. note:: Currently seconds that amount to days are not supported.
  
      :param seconds: Mandatory seconds value e.g. 1100.
      :type seconds: int
  
      :returns: A humanised version of the seconds count.
      :rtype: str