Safely initialize a repository class to a property.

        Args:
            repository_class (class): The class to initialize.
            version (str): The gcp service version for the repository.

        Returns:
            object: An instance of repository_class.

def client(self, service_name, version, component, **kw):
        """Safely initialize a repository class to a property.

        Args:
            repository_class (class): The class to initialize.
            version (str): The gcp service version for the repository.

        Returns:
            object: An instance of repository_class.
        """
        service = _create_service_api(
            self._credentials,
            service_name,
            version,
            kw.get('developer_key'),
            kw.get('cache_discovery', False),
            self._http or _build_http())

        return ServiceClient(
            gcp_service=service,
            component=component,
            credentials=self._credentials,
            rate_limiter=self._rate_limiter,
            use_cached_http=self._use_cached_http,
            http=self._http)