def METHOD_NAME(self) -> pubsub_v1.PublisherClient:
    if self.config.path_to_credentials_json_file is not None:
        credentials = service_account.Credentials.from_service_account_file(
            self.config.path_to_credentials_json_file
        )
        return pubsub_v1.PublisherClient(credentials=credentials)
    else:
        return pubsub_v1.PublisherClient()