code: def _get_run_object(obj, run_id, user_namespace):
      from metaflow import Flow
  
      follow_new_runs = True
      flow_name = obj.flow.name
  
      if run_id is not None:
          follow_new_runs = False
          run = _get_run_from_cli_set_runid(obj, run_id)
          obj.echo(
              "Using run-id %s" % run.pathspec, fg="blue", bold=False
          )
          return run, follow_new_runs, None
  
      _msg = "Searching for runs in namespace: %s" % user_namespace
      obj.echo(_msg, fg="blue", bold=False)
  
      try:
          namespace(user_namespace)
          flow = Flow(pathspec=flow_name)
          run = flow.latest_run
      except MetaflowNotFound:
          # When we have no runs found for the Flow, we need to ensure that
          # if the `follow_new_runs` is set to True; If `follow_new_runs` is set to True then
          # we don't raise the Exception and instead we return None and let the
          # background Thread wait on the Retrieving the run object.
          _status_msg = "No run found for *%s*." % flow_name
          return None, follow_new_runs, _status_msg
  
      except MetaflowNamespaceMismatch:
          _status_msg = (
              "No run found for *%s* in namespace *%s*. You can switch the namespace using --namespace"
              % (
                  flow_name,
                  user_namespace,
              )
          )
          return None, follow_new_runs, _status_msg
  
      obj.echo("Using run-id %s" % run.pathspec, fg="blue", bold=False)
      return run, follow_new_runs, None
  
imports: from metaflow.client import Task
  from metaflow import JSONType, namespace
  from metaflow.util import resolve_identity
  from metaflow.exception import CommandException, MetaflowNotFound, MetaflowNamespaceMismatch
  import webbrowser
  import re
  from metaflow._vendor import click
  import os
  import json
  import uuid
  import signal
  import random
  from contextlib import contextmanager
  from functools import wraps
  from metaflow.exception import MetaflowNamespaceMismatch
  from .card_datastore import CardDatastore, NUM_SHORT_HASH_CHARS
  from .exception import CardClassFoundException, IncorrectCardArgsException, UnrenderableCardException, CardNotPresentException, TaskNotFoundException
  import traceback
  from collections import namedtuple
  from .card_resolver import resolve_paths_from_task, resumed_info
label_desc: Use image node_id 19 for calling a global function with example usage: _get_run_object(obj, run_id, user_namespace) and returns: run,  follow_new_runs,  None, run,  follow_new_runs,  None, None,  follow_new_runs,  _status_msg, None,  follow_new_runs,  _status_msg