def get_session_info (self):
    expires = self.device.get('expires', None)
    if expires is not None:
      expires = parse(expires)

    now = datetime.now( )
    out = dict(device=self.device.name
      , vendor=__name__
      , used=now
      )
    if expires is None or now < expires or (expires - now).total_seconds() > (60 * self.MAX_SESSION_DURATION):
      fields = self.create_session( )
      out.update(**self.update_session_info(fields))
    else:
      out['expires'] = expires
      out['model'] = self.device.get('model', None)
    return out
dataset/ETHPy150Open openaps/openaps/openaps/vendors/medtronic.py/MedtronicTask.get_session_info/swapped operands of `<`