code: def format_dict(dict_like, omit_keys=None, omit_values=None):
      from snakemake.io import Namedlist
  
      omit_keys = omit_keys or []
      omit_values = omit_values or []
  
      if isinstance(dict_like, Namedlist):
          items = dict_like.items()
      elif isinstance(dict_like, dict):
          items = dict_like.items()
      else:
          raise ValueError(
              "bug: format_dict applied to something neither a dict nor a Namedlist"
          )
      return ", ".join(
          f"{name}={value}"
          for name, value in items
          if name not in omit_keys and value not in omit_values
      )
  
imports: import logging
  import platform
  import time
  import datetime
  import sys
  import os
  import json
  import threading
  from functools import partial
  import inspect
  import textwrap
label_desc: Use image node_id 2 for calling a global function with example usage: format_dict(dict_like, omit_keys, omit_values) and returns: str