code: def _test_namespace(self):
      from metaflow.client import (
          Flow,
          get_namespace,
          namespace,
          default_namespace,
      )
      from metaflow.exception import MetaflowNamespaceMismatch
  
      # test 1) METAFLOW_USER should be the default
      assert_equals(
          "user:%s" % os.environ.get("METAFLOW_USER"), get_namespace()
      )
      # test 2) Run should be in the listing
      assert_equals(
          True, self.run_id in [run.id for run in Flow(self.flow.name)]
      )
      # test 3) changing namespace should change namespace
      namespace("user:nobody")
      assert_equals(get_namespace(), "user:nobody")
      # test 4) fetching results in the incorrect namespace should fail
      assert_exception(
          lambda: Flow(self.flow.name)[self.run_id],
          MetaflowNamespaceMismatch,
      )
      # test 5) global namespace should work
      namespace(None)
      assert_equals(get_namespace(), None)
      Flow(self.flow.name)[self.run_id]
      default_namespace()
  
imports: import json
  import os
  from metaflow.util import is_stringish
  from .None import MetaflowCheck, AssertArtifactFailed, AssertCardFailed, AssertLogFailed, assert_equals, assert_exception, truncate
label_desc: Use image node_id 2 for calling the MetadataCheck obj's underlying member method code with example usage: obj._test_namespace() without return types