def METHOD_NAME(self) -> Optional[CollectorServiceStub]:
    if self._grpc_client is None:
        if self.insecure:
            self._grpc_client = CollectorServiceStub(
                insecure_channel(self.collector_endpoint)
            )
        else:
            self._grpc_client = CollectorServiceStub(
                secure_channel(self.collector_endpoint, self.credentials)
            )
    return self._grpc_client