class_docstr: Test that the current singleton returns the right values
class_docstr_tok: ["Test","that","the","current","singleton","returns","the","right","values"]
code: def check_results(self, flow, checker):
      run = checker.get_run()
      from metaflow import get_namespace
  
      checker_namespace = get_namespace()
      if run is None:
          # very basic sanity check for CLI
          for step in flow:
              checker.assert_artifact(step.name, "step_name", step.name)
              checker.assert_artifact(
                  step.name, "project_names", {"current_singleton"}
              )
      else:
          from metaflow import Task, namespace
  
          task_data = run.data.task_data
          for pathspec, uuid in task_data.items():
              assert_equals(Task(pathspec).data.uuid, uuid)
  
          # Override the namespace for the pickling/unpickling checks
          namespace("non-existent-namespace-to-test-namespacecheck")
          for step in run:
              for task in step:
                  assert_equals(task.data.step_name, step.id)
                  pathspec = "/".join(task.pathspec.split("/")[-4:])
                  assert_equals(task.data.uuid, task_data[pathspec])
                  assert_equals(
                      task.data.task_obj.pathspec, task.pathspec
                  )
                  # Check we can go up and down pickled objects even in a different
                  # namespace
                  assert_equals(
                      task.data.parent.parent.id, task.data.run_obj.id
                  )
                  assert_equals(
                      task.data.run_obj[task.data.step_name].id,
                      task.data.step_name,
                  )
          # Restore the original namespace back for these tests
          namespace(checker_namespace)
          assert_equals(run.data.run_obj.pathspec, run.pathspec)
          assert_equals(run.data.project_names, {"current_singleton"})
          assert_equals(run.data.branch_names, {"user.tester"})
          assert_equals(
              run.data.project_flow_names,
              {
                  "current_singleton.user.tester.CurrentSingletonTestFlow"
              },
          )
          assert_equals(run.data.is_production, {False})
          assert_equals(run.data.flow_names, {run.parent.id})
          assert_equals(run.data.run_ids, {run.id})
          assert_equals(run.data.origin_run_ids, {None})
          assert_equals(run.data.namespaces, {"user:tester"})
          assert_equals(run.data.usernames, {"tester"})
          assert_equals(
              run.data.tags,
              {
                  "\u523a\u8eab means sashimi",
                  "multiple tags should be ok",
              },
          )
  
imports: from metaflow_test import MetaflowTest, ExpectationFailed, steps
label_desc: Use image node_id 4 for calling the CurrentSingletonTest obj's underlying member method code with example usage: obj.check_results(flow, checker) without return types