def _gcp_client(project, mod_name, pkg_name, key_file=None, http_auth=None,<EOL>user_agent=None):
client = None<EOL>if http_auth is None:<EOL><INDENT>http_auth = _googleauth(key_file=key_file, user_agent=user_agent)<EOL><DEDENT>try:<EOL><INDENT>google_module = importlib.import_module('<STR_LIT:.>' + mod_name,<EOL>package=pkg_name)<EOL>client = google_module.Client(use_GAX=USE_GAX, project=project,<EOL>http=http_auth)<EOL><DEDENT>except ImportError as ie:<EOL><INDENT>import_err = '<STR_LIT>' % (pkg_name, mod_name)<EOL>raise ImportError(import_err)<EOL><DEDENT>except TypeError:<EOL><INDENT>client = google_module.Client(project=project, http=http_auth)<EOL><DEDENT>if user_agent and hasattr(client, '<STR_LIT>'):<EOL><INDENT>client.user_agent = user_agent<EOL><DEDENT>return client<EOL>
Private GCP client builder.

:param project: Google Cloud project string.
:type project: ``str``

:param mod_name: Module name to load.  Should be found in sys.path.
:type mod_name: ``str``

:param pkg_name: package name that mod_name is part of.  Default is 'google.cloud' .
:type pkg_name: ``str``

:param key_file: Default is None.
:type key_file: ``str`` or None

:param http_auth: httplib2 authorized client. Default is None.
:type http_auth: :class: `HTTPLib2`

:param user_agent: User Agent string to use in requests. Default is None.
:type http_auth: ``str`` or None

:return: GCP client
:rtype: ``object``