def METHOD_NAME(self):
    with portalocker.Lock(self._unsend_events_file, 'r+', timeout=5) as f:
        o = json.loads(f.read())
        return len(o.get('unsend_events', [])) >= self._upload_threshold