code: def _floor_to(dt, hour, minute, second):
      
      new_dt = dt.replace(hour=hour, minute=minute, second=second)
      if new_dt <= dt:
          return new_dt
      else:
          return new_dt - timedelta(days=1)
docs: Route the given datetime to the latest time with the hour, minute, second
      before it.