src/transformers/utils/import_utils.py/is_protobuf_available
def is_protobuf_available():
    if importlib.util.find_spec("google") is None:
        return False
    return importlib.util.find_spec("google.protobuf") is not None