code: def _message_in_range(self, message):
          
          # No entity means message IDs between chats may vary
          if self.entity:
              if self.reverse:
                  if message.id <= self.last_id or message.id >= self.max_id:
                      return False
              else:
                  if message.id >= self.last_id or message.id <= self.min_id:
                      return False
  
          return True
docs: Determine whether the given message is in the range or
          it should be ignored (and avoid loading more chunks).