class_docstr: A wrapper for `Google Cloud Vision (GCV) <https://cloud.google.com/vision>`_ Text
  Detection APIs.
  
  Note:
      Google Cloud Vision API returns the output text in two types:
  
      * `text_annotations`:
  
          In this format, GCV automatically find the best aggregation
          level for the text, and return the results in a list. We use
          :obj:`~gather_text_annotations` to reterive this type of
          information.
  
      * `full_text_annotation`:
  
          To support better user control, GCV also provides the
          `full_text_annotation` output, where it returns the hierarchical
          structure of the output text. To process this output, we provide
          the :obj:`~gather_full_text_annotation` function to aggregate the
          texts of the given aggregation level.
class_docstr_tok: ["A","wrapper","for","`","Google","Cloud","Vision","(","GCV",")","<","https",":","\/\/cloud.google.com\/vision",">","`","_","Text","Detection","APIs",".","Note",":","Google","Cloud","Vision","API","returns","the","output","text","in","two","types",":","*","`","text_annotations","`",":","In","this","format",",","GCV","automatically","find","the","best","aggregation","level","for","the","text",",","and","return","the","results","in","a","list",".","We","use",":","obj",":","`","~gather_text_annotations","`","to","reterive","this","type","of","information",".","*","`","full_text_annotation","`",":","To","support","better","user","control",",","GCV","also","provides","the","`","full_text_annotation","`","output",",","where","it","returns","the","hierarchical","structure","of","the","output","text",".","To","process","this","output",",","we","provide","the",":","obj",":","`","~gather_full_text_annotation","`","function","to","aggregate","the","texts","of","the","given","aggregation","level","."]
docstr: Specifiy the credential to use for the GCV OCR API.
  
  Args:
      credential_path (:obj:`str`): The path to the credential file
docstr_tok: ["Specifiy","the","credential","to","use","for","the","GCV","OCR","API",".","Args",":","credential_path","(",":","obj",":","`","str","`",")",":","The","path","to","the","credential","file"]
code: def with_credential(cls, credential_path, **kwargs):
      """Specifiy the credential to use for the GCV OCR API.
  
      Args:
          credential_path (:obj:`str`): The path to the credential file
      """
      os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = credential_path
      return cls(**kwargs)
  
imports: import io
  import os
  import json
  import warnings
  import numpy
  from cv2 import imencode
  from .base import BaseOCRAgent, BaseOCRElementType
  from ..elements import Layout, TextBlock, Quadrilateral, TextBlock
  from ..file_utils import is_gcv_available
label_desc: Use image node_id 2 for calling the GCVAgent obj's underlying member method code with example usage: obj.with_credential(cls, credential_path) and returns: cls