code: def dict_to_cli_options(params):
      for k, v in params.items():
          # Omit boolean options set to false or None, but preserve options with an empty
          # string argument.
          if v is not False and v is not None:
              # we need special handling for 'with' since it is a reserved
              # keyword in Python, so we call it 'decospecs' in click args
              if k == "decospecs":
                  k = "with"
              k = k.replace("_", "-")
              v = v if isinstance(v, (list, tuple, set)) else [v]
              for value in v:
                  yield "--%s" % k
                  if not isinstance(value, bool):
                      value = to_unicode(value)
  
                      # Of the value starts with $, assume the caller wants shell variable
                      # expansion to happen, so we pass it as is.
                      # NOTE: We strip '\' to allow for various storages to use escaped
                      # shell variables as well.
                      if value.lstrip("\\").startswith("$"):
                          yield value
                      else:
                          # Otherwise, assume it is a literal value and quote it safely
                          yield _quote(value)
  
imports: import os
  import shutil
  import sys
  import tempfile
  import zlib
  import base64
  from functools import wraps
  from io import BytesIO
  from itertools import takewhile
  import re
  from metaflow.exception import MetaflowUnknownUser, MetaflowInternalError
  from typing import NamedTuple
label_desc: Use image node_id 20 for calling a global function with example usage: dict_to_cli_options(params) without return types