code: def check_if_ok_to_update(self):
          
          current_time = int(time.time())
          last_refresh = self.last_refresh
          if last_refresh is None:
              last_refresh = 0
          if current_time >= (last_refresh + self.refresh_rate):
              return True
          return False
docs: Check if it is ok to perform an http request.