docstr: Get the credentials for a Google Storage bucket from the config
  :param uri: URI of bucket, directory or file
  :param create_if_not_found: If True and the config is not found in the current configurations, create a new one.
      Else, don't create a new one and return None
  :return: GSBucketConfig: bucket config
docstr_tok: ["Get","the","credentials","for","a","Google","Storage","bucket","from","the","config",":","param","uri",":","URI","of","bucket",",","directory","or","file",":","param","create_if_not_found",":","If","True","and","the","config","is","not","found","in","the","current","configurations",",","create","a","new","one",".","Else",",","do","n't","create","a","new","one","and","return","None",":","return",":","GSBucketConfig",":","bucket","config"]
code: def get_config_by_uri(self, uri, create_if_not_found=True):
      """
      Get the credentials for a Google Storage bucket from the config
      :param uri: URI of bucket, directory or file
      :param create_if_not_found: If True and the config is not found in the current configurations, create a new one.
          Else, don't create a new one and return None
      :return: GSBucketConfig: bucket config
      """
  
      res = (
          config
          for config, prefix in self._prefixes
          if prefix is not None and uri.lower().startswith(prefix)
      )
  
      try:
          return next(res)
      except StopIteration:
          if not create_if_not_found:
              return None
  
      parsed = furl.furl(uri)
  
      return GSBucketConfig(
          bucket=parsed.netloc,
          subdir=str(parsed.path),
          project=self._default_project,
          credentials_json=self._default_credentials,
          pool_connections=self._default_pool_connections,
          pool_maxsize=self._default_pool_maxsize,
      )
  
imports: import abc
  import warnings
  from copy import copy
  from operator import itemgetter
  from os import getenv
  import furl
  import six
  from attr import attrib, attrs
label_desc: Use image node_id 6 for calling the GSBucketConfigurations obj's underlying member method code with example usage: obj.get_config_by_uri(uri, create_if_not_found) and returns: GSBucketConfig, next, None