code: def list_runs(
      obj,
      running=False,
      succeeded=False,
      failed=False,
      timed_out=False,
      aborted=False,
  ):
      states = []
      if running:
          states.append("RUNNING")
      if succeeded:
          states.append("SUCCEEDED")
      if failed:
          states.append("FAILED")
      if timed_out:
          states.append("TIMED_OUT")
      if aborted:
          states.append("ABORTED")
      executions = StepFunctions.list(obj.state_machine_name, states)
      found = False
      for execution in executions:
          found = True
          if execution.get("stopDate"):
              obj.echo(
                  "*sfn-{id}* "
                  "startedAt:'{startDate}' "
                  "stoppedAt:'{stopDate}' "
                  "*{status}*".format(
                      id=execution["name"],
                      status=execution["status"],
                      startDate=execution["startDate"].replace(
                          microsecond=0
                      ),
                      stopDate=execution["stopDate"].replace(
                          microsecond=0
                      ),
                  )
              )
          else:
              obj.echo(
                  "*sfn-{id}* "
                  "startedAt:'{startDate}' "
                  "*{status}*".format(
                      id=execution["name"],
                      status=execution["status"],
                      startDate=execution["startDate"].replace(
                          microsecond=0
                      ),
                  )
              )
      if not found:
          if len(states) > 0:
              status = ""
              for idx, state in enumerate(states):
                  if idx == 0:
                      pass
                  elif idx == len(states) - 1:
                      status += " and "
                  else:
                      status += ", "
                  status += "*%s*" % state
              obj.echo(
                  "No %s executions for *%s* found on AWS Step Functions."
                  % (status, obj.state_machine_name)
              )
          else:
              obj.echo(
                  "No executions for *%s* found on AWS Step Functions."
                  % (obj.state_machine_name)
              )
  
imports: import base64
  from metaflow._vendor import click
  from hashlib import sha1
  import json
  import re
  from metaflow import current, decorators, parameters, JSONType
  from metaflow.metaflow_config import SERVICE_VERSION_CHECK, SFN_STATE_MACHINE_PREFIX, UI_URL
  from metaflow.exception import MetaflowException, MetaflowInternalError
  from metaflow.package import MetaflowPackage
  from metaflow.plugins.aws.batch.batch_decorator import BatchDecorator
  from metaflow.tagging_util import validate_tags
  from metaflow.util import get_username, to_bytes, to_unicode, version_parse
  from .step_functions import StepFunctions
  from .production_token import load_token, store_token, new_token
label_desc: Use image node_id 9 for calling a global function with example usage: list_runs(obj, running, succeeded, failed, timed_out, aborted) without return types