code: def opt_callback(
      ctx: Context, param: Parameter, value: ClickParamType
  ):
      # NOTE: our new options implementation will have the following format:
      #   --opt ARG[=|:]VALUE[,VALUE] (e.g., --opt key1=value1,value2 --opt key2:value3/value4:hello)
      # Argument and values per --opt has one-to-one or one-to-many relationship,
      # separated by '=' or ':'.
      # TODO: We might also want to support the following format:
      #  --opt arg1 value1 arg2 value2 --opt arg3 value3
      #  --opt arg1=value1,arg2=value2 --opt arg3:value3
  
      assert (
          param.multiple
      ), "Only use this callback when multiple=True."
      if MEMO_KEY not in ctx.params:
          # By default, multiple options are stored as a tuple.
          # our memoized options are stored as a dict.
          ctx.params[MEMO_KEY] = {}
  
      if param.name not in ctx.params[MEMO_KEY]:
          ctx.params[MEMO_KEY][param.name] = ()
  
      value = normalize_none_type(value)
      if value is not None and isinstance(value, tuple):
          for opt in value:
              o, *val = re.split(r"=|:", opt, maxsplit=1)
              norm = o.replace("-", "_")
              if len(val) == 0:
                  # --opt bool
                  ctx.params[MEMO_KEY][norm] = True
              else:
                  # --opt key=value
                  ctx.params[MEMO_KEY].setdefault(norm, ())
                  ctx.params[MEMO_KEY][norm] += (*val,)
      return value
  
imports: from __future__ import annotations
  import difflib
  import functools
  import logging
  import os
  import re
  import time
  import typing
  import attr
  import click
  import click_option_group
  from click import ClickException
  from click.exceptions import UsageError
label_desc: Use image node_id 9 for calling a global function with example usage: opt_callback(ctx, param, value) and returns: value