code: def cb_key_val(ctx, param, value):
      """
      click callback to validate `--opt KEY1=VAL1 --opt KEY2=VAL2` and collect
      in a dictionary like the one below, which is what the CLI function receives.
      If no value or `None` is received then an empty dictionary is returned.
  
          {
              'KEY1': 'VAL1',
              'KEY2': 'VAL2'
          }
  
      Note: `==VAL` breaks this as `str.split('=', 1)` is used.
  
      """
      if not value:
          return {}
      else:
          out = {}
          for pair in value:
              if "=" not in pair:
                  raise click.BadParameter(
                      f"Invalid syntax for KEY=VAL arg: {pair}"
                  )
              else:
                  k, v = pair.split("=", 1)
                  k = k.lower()
                  v = v.lower()
                  out[k] = (
                      None
                      if v.lower() in ["none", "null", "nil", "nada"]
                      else v
                  )
          return out
  
imports: from collections import defaultdict
  import click
label_desc: Use image node_id 3 for calling a global function with example usage: cb_key_val(ctx, param, value) and returns: dict, out