def _event_should_use_new_import_api(
            self, event: Event, cal: CalendarListEntry
    ) -> bool:
        """Evaluates whether a given event should use the newer "import" API.

        Returns true if the user hasn't opted out and the event is cleanly
        importable.
        """
        if not self.options.get('use_legacy_import'):
            return False
        event_includes_self = any(
                'self' in a or a['email'] == cal['id']
                for a in event.get('attendees', []))
        return 'iCalUID' in event and event_includes_self
Evaluates whether a given event should use the newer "import" API.

        Returns true if the user hasn't opted out and the event is cleanly
        importable.
        
gcalcli/gcal.py