code: def namespace_token_or_error(self, ns: str) -> str:
      if ns in self._tokens:
          return self._tokens[ns]
  
      deploy_config = get_deploy_config()
      default_ns = deploy_config.default_namespace()
      ns_arg = "" if ns == default_ns else f"-n {ns}"
      raise NotLoggedInError(ns_arg)
  
imports: from typing import Optional, Dict, Tuple
  import base64
  import collections.abc
  import os
  import json
  import logging
  from hailtop.config import get_deploy_config
  from hailtop.utils import first_extant_file
label_desc: Use image node_id 9 for calling the Tokens obj's underlying member method code with example usage: obj.namespace_token_or_error(ns) and returns: self