code: def from_client_config(cls, client_config, scopes, **kwargs):
          
          if 'web' in client_config:
              client_type = 'web'
          elif 'installed' in client_config:
              client_type = 'installed'
          else:
              raise ValueError(
                  'Client secrets must be for a web or installed app.')
  
          session, client_config = (
              google_auth_oauthlib.helpers.session_from_client_config(
                  client_config, scopes, **kwargs))
  
          redirect_uri = kwargs.get('redirect_uri', None)
          return cls(session, client_type, client_config, redirect_uri)
docs: Creates a :class:`requests_oauthlib.OAuth2Session` from client
          configuration loaded from a Google-format client secrets file.
  
          Args:
              client_config (Mapping[str, Any]): The client
                  configuration in the Google `client secrets`_ format.
              scopes (Sequence[str]): The list of scopes to request during the
                  flow.
              kwargs: Any additional parameters passed to
                  :class:`requests_oauthlib.OAuth2Session`
  
          Returns:
              Flow: The constructed Flow instance.
  
          Raises:
              ValueError: If the client configuration is not in the correct
                  format.
  
          .. _client secrets:
              https://developers.google.com/api-client-library/python/guide
              /aaa_client_secrets