original_docstring: Helper for session-related API calls.
docstring: Helper for session-related API calls.
docstring_tokens: Helper for session - related API calls .
code: def spanner_api(self):
          """Helper for session-related API calls."""
          if self._spanner_api is None:
              client_info = self._instance._client._client_info
              client_options = self._instance._client._client_options
              if self._instance.emulator_host is not None:
                  transport = SpannerGrpcTransport(
                      channel=grpc.insecure_channel(self._instance.emulator_host)
                  )
                  self._spanner_api = SpannerClient(
                      client_info=client_info, transport=transport
                  )
                  return self._spanner_api
              credentials = self._instance._client.credentials
              if isinstance(credentials, google.auth.credentials.Scoped):
                  credentials = credentials.with_scopes((SPANNER_DATA_SCOPE,))
              self._spanner_api = SpannerClient(
                  credentials=credentials,
                  client_info=client_info,
                  client_options=client_options,
              )
          return self._spanner_api
code_tokens: def spanner_api ( self ) : if self . _spanner_api is None : client_info = self . _instance . _client . _client_info client_options = self . _instance . _client . _client_options if self . _instance . emulator_host is not None : transport = SpannerGrpcTransport ( channel = grpc . insecure_channel ( self . _instance . emulator_host ) ) self . _spanner_api = SpannerClient ( client_info = client_info , transport = transport ) return self . _spanner_api credentials = self . _instance . _client . credentials if isinstance ( credentials , google . auth . credentials . Scoped ) : credentials = credentials . with_scopes ( ( SPANNER_DATA_SCOPE , ) ) self . _spanner_api = SpannerClient ( credentials = credentials , client_info = client_info , client_options = client_options , ) return self . _spanner_api
short_docstring: Helper for session-related API calls.
short_docstring_tokens: Helper for session - related API calls .
comment: """Helper for session-related API calls."""