code: def timedelta_to_httpdate(td):
      
      if isinstance(td, (int, float)):
          return format_date_time(time.time() + td)
      elif isinstance(td, timedelta):
          return format_date_time(time.time() + total_seconds(td))
      else:
          raise TypeError("expected datetime.timedelta or number of seconds"
                          "(int/float), got '%s'" % td)
docs: Convert datetime.timedelta or number of seconds to HTTP date.
  
      Returns an HTTP date in the future.