class_docstr: Reads images from bucket(s) in Google Cloud Storage via user's Application
  Default Credential (ADC).
  
  Once the file is downloaded from GCS, this reader leverages ImageIO Reader's
  image loading methods.
  
  Prerequisites:
  User has authenticated with Google Cloud Storage Application Default Credential
  (ADC) by running the command: "gcloud auth application-default login",
  or is running CellProfiler in an environment where this credential has already
  been configured for them such as app.terra.bio or CloudShell.
class_docstr_tok: ["Reads","images","from","bucket","(","s",")","in","Google","Cloud","Storage","via","user","'s","Application","Default","Credential","(","ADC",")",".","Once","the","file","is","downloaded","from","GCS",",","this","reader","leverages","ImageIO","Reader's","image","loading","methods",".","Prerequisites",":","User","has","authenticated","with","Google","Cloud","Storage","Application","Default","Credential","(","ADC",")","by","running","the","command",":","``","gcloud","auth","application-default","login","''",",","or","is","running","CellProfiler","in","an","environment","where","this","credential","has","already","been","configured","for","them","such","as","app.terra.bio","or","CloudShell","."]
docstr: This function needs to evaluate whether a given ImageFile object
  can be read by this reader class.
  
  Return value should be an integer representing suitability:
  -1 - 'I can't read this at all'
  1 - 'I am the one true reader for this format, don't even bother checking any others'
  2 - 'I am well-suited to this format'
  3 - 'I can read this format, but I might not be the best',
  4 - 'I can give it a go, if you must'
  
  The allow_open parameter dictates whether the reader is permitted to read the file when
  making this decision. If False the decision should be made using file extension only.
  Any opened files should be closed before returning.
  
  The volume parameter specifies whether the reader will need to return a 3D array.
docstr_tok: ["This","function","needs","to","evaluate","whether","a","given","ImageFile","object","can","be","read","by","this","reader","class",".","Return","value","should","be","an","integer","representing","suitability",":","-1","-","'","I","ca","n't","read","this","at","all'","1","-","'","I","am","the","one","true","reader","for","this","format",",","do","n't","even","bother","checking","any","others'","2","-","'","I","am","well-suited","to","this","format'","3","-","'","I","can","read","this","format",",","but","I","might","not","be","the","best","'",",","4","-","'","I","can","give","it","a","go",",","if","you","must'","The","allow_open","parameter","dictates","whether","the","reader","is","permitted","to","read","the","file","when","making","this","decision",".","If","False","the","decision","should","be","made","using","file","extension","only",".","Any","opened","files","should","be","closed","before","returning",".","The","volume","parameter","specifies","whether","the","reader","will","need","to","return","a","3D","array","."]
code: def supports_format(cls, image_file, allow_open=False, volume=False):
      """This function needs to evaluate whether a given ImageFile object
      can be read by this reader class.
  
      Return value should be an integer representing suitability:
      -1 - 'I can't read this at all'
      1 - 'I am the one true reader for this format, don't even bother checking any others'
      2 - 'I am well-suited to this format'
      3 - 'I can read this format, but I might not be the best',
      4 - 'I can give it a go, if you must'
  
      The allow_open parameter dictates whether the reader is permitted to read the file when
      making this decision. If False the decision should be made using file extension only.
      Any opened files should be closed before returning.
  
      The volume parameter specifies whether the reader will need to return a 3D array.
      """
      if image_file.scheme not in SUPPORTED_SCHEMES:
          return -1
  
      if image_file.file_extension in SUPPORTED_EXTENSIONS:
          return 1
  
      if image_file.file_extension in SEMI_SUPPORTED_EXTENSIONS:
          return 3
  
      return 4
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/readers/gcs_reader.py
imports: import io
  from urllib.parse import urlparse
  import logging
  import imageio
  from cellprofiler_core.readers.imageio_reader import ImageIOReader
  from cellprofiler_core.readers.imageio_reader import SUPPORTED_EXTENSIONS
  from cellprofiler_core.readers.imageio_reader import SEMI_SUPPORTED_EXTENSIONS
  from google.cloud import storage
  from google.auth.exceptions import DefaultCredentialsError
  from google.cloud.exceptions import NotFound
label_desc: Use image node_id 1 for calling the GcsReader obj's underlying member method code with example usage: obj.supports_format(cls, image_file, allow_open, volume) and returns: int, unknown, int, int