def _is_registered(cls, import_or_export_operator, operator_type):
        """Determine if an importer/exporter is already registered."""
        assert operator_type in ["IMPORT", "EXPORT"]
        return hasattr(
            bpy.types,
            cls._bl_idname_to_bpy_types_name(
                import_or_export_operator.bl_idname, operator_type
            ),
        )
Determine if an importer/exporter is already registered.
photogrammetry_importer/registration/registration.py