code: def pretty_duration(seconds):
      
      if seconds is None:
          return ''
      ret = ''
      if seconds >= 86400:
          ret += '{:.0f}d'.format(int(seconds / 86400))
          seconds = seconds % 86400
      if seconds >= 3600:
          ret += '{:.0f}h'.format(int(seconds / 3600))
          seconds = seconds % 3600
      if seconds >= 60:
          ret += '{:.0f}m'.format(int(seconds / 60))
          seconds = seconds % 60
      if seconds > 0:
          ret += '{:.1f}s'.format(seconds)
      return ret
docs: Returns a user-friendly representation of the provided duration in seconds.
      For example: 62.8 => "1m2.8s", or 129837.8 => "2d12h4m57.8s"