code: def round_to_specified_time(self, a_datetime, hour, minute, second, mode="lower"):
          
          mode = mode.lower()
          
          new_datetime = datetime(a_datetime.year, a_datetime.month, a_datetime.day,
                                  hour, minute, second)
          if mode == "lower": 
              if new_datetime <= a_datetime:
                  return new_datetime
              else:
                  return timewrapper.add_days(new_datetime, -1)
          elif mode == "upper":
              if new_datetime >= a_datetime:
                  return new_datetime
              else:
                  return timewrapper.add_days(new_datetime, 1)
          else:
              raise ValueError("'mode' has to be lower or upper!")
docs: Round the given datetime to specified hour, minute and second.
          
          :param mode: if 'lower', floor to. if 'upper', ceiling to.
          
          **中文文档**
          
          将给定时间对齐到最近的一个指定了小时, 分钟, 秒的时间上。