code: def validate_preload_argv(ctx, param, value):
      """Click option callback providing validation of preload subcommand arguments."""
      if not value and not ctx.params.get("preload", None):
          # No preload argv provided and no preload modules specified.
          return value
  
      if value and not ctx.params.get("preload", None):
          # Report a usage error matching standard click error conventions.
          unexpected_args = [v for v in value if v.startswith("-")]
          for a in unexpected_args:
              raise click.NoSuchOption(a)
          raise click.UsageError(
              "Got unexpected extra argument%s: (%s)"
              % ("s" if len(value) > 1 else "", " ".join(value))
          )
  
      preload_modules = {
          name: _import_module(name)
          for name in ctx.params.get("preload")
          if not is_webaddress(name)
      }
  
      preload_commands = [
          getattr(m, "dask_setup", None)
          for m in preload_modules.values()
          if isinstance(getattr(m, "dask_setup", None), click.Command)
      ]
  
      if len(preload_commands) > 1:
          raise click.UsageError(
              "Multiple --preload modules with click-configurable setup: %s"
              % list(preload_modules.keys())
          )
  
      if value and not preload_commands:
          raise click.UsageError(
              "Unknown argument specified: %r Was click-configurable --preload target provided?"
          )
      if not preload_commands:
          return value
      else:
          preload_command = preload_commands[0]
  
      ctx = click.Context(preload_command, allow_extra_args=False)
      preload_command.parse_args(ctx, list(value))
  
      return value
  
imports: from __future__ import annotations
  import filecmp
  import inspect
  import logging
  import os
  import shutil
  import sys
  from collections.abc import Iterable, Sequence
  from importlib import import_module
  from types import ModuleType
  from typing import TYPE_CHECKING, cast
  import click
  from dask.utils import tmpfile
  from distributed.core import Server
  from distributed.utils import import_file
label_desc: Use image node_id 1 for calling a global function with example usage: validate_preload_argv(ctx, param, value) and returns: value, value, value