code: def status():
      from metaflow.client import get_metadata
  
      res = get_metadata()
      if res:
          res = res.split("@")
      else:
          raise click.ClickException(
              "Unknown status: cannot find a Metadata provider"
          )
      if res[0] == "service":
          echo("Using Metadata provider at: ", nl=False)
          echo('"%s"\n' % res[1], fg="cyan")
          echo("To list available flows, type:\n")
          echo("1. python")
          echo("2. from metaflow import Metaflow")
          echo("3. list(Metaflow())")
          return
  
      from metaflow.client import namespace, metadata, Metaflow
  
      # Get the local data store path
      path = LocalStorage.get_datastore_root_from_config(
          echo, create_on_absent=False
      )
      # Throw an exception
      if path is None:
          raise click.ClickException(
              "Could not find "
              + click.style('"%s"' % DATASTORE_LOCAL_DIR, fg="red")
              + " in the current working tree."
          )
  
      stripped_path = os.path.dirname(path)
      namespace(None)
      metadata("local@%s" % stripped_path)
      echo("Working tree found at: ", nl=False)
      echo('"%s"\n' % stripped_path, fg="cyan")
      echo("Available flows:", fg="cyan", bold=True)
      for flow in Metaflow():
          echo("* %s" % flow, fg="cyan")
  
file_path: metaflow/metaflow/cmd/main_cli.py
imports: import os
  from metaflow._vendor import click
  from metaflow.extension_support.cmd import process_cmds, resolve_cmds
  from metaflow.plugins.datastores.local_storage import LocalStorage
  from metaflow.metaflow_config import DATASTORE_LOCAL_DIR, CONTACT_INFO
  from metaflow.metaflow_version import get_version
  from .util import echo_always
  import metaflow.tracing
label_desc: Use image node_id 3 for calling a global function with example usage: status() without return types