" `pip install gapic-google-longrunning`"
            )
        operations = []
        for name in operation_names:
            request = GetOperationRequest(name=name)
            operations.append(self._client.get_operation(request=request))
        return operations
[docs]    def is_running(self, operations: List["Operation"]) -> bool:
        for op in operations:
            if not op.done():
                return True
        return False
[docs]    def docai_parse(
        self,
        blobs: Sequence[Blob],
        *,
        gcs_output_path: Optional[str] = None,
        batch_size: int = 4000,
        enable_native_pdf_parsing: bool = True,
    ) -> List["Operation"]:
        """Runs Google DocAI PDF parser on a list of blobs.
        Args:
            blobs: a list of blobs to be parsed
            gcs_output_path: a path (folder) on GCS to store results
            batch_size: amount of documents per batch
            enable_native_pdf_parsing: a config option for the parser
        DocAI has a limit on the amount of documents per batch, that's why split a
            batch into mini-batches. Parsing is an async long-running operation
            on Google Cloud and results are stored in a output GCS bucket.
        """
        try:
            from google.cloud import documentai
            from google.cloud.documentai_v1.types import OcrConfig, ProcessOptions
        except ImportError:
            raise ImportError(
                "documentai package not found, please install it with"
                " `pip install google-cloud-documentai`"
            )
        if not self._processor_name:
            raise ValueError("Processor name is not defined, aborting!")