code: def validate_multi_return(output_lists, output_values, callback_id):
      if not isinstance(output_values, (list, tuple)):
          raise exceptions.InvalidCallbackReturnValue(
              dedent(
                  f"""
                  The callback {callback_id} is a multi-output.
                  Expected the output type to be a list or tuple but got:
                  {output_values!r}.
                  """
              )
          )
  
      if len(output_values) != len(output_lists):
          raise exceptions.InvalidCallbackReturnValue(
              f"""
              Invalid number of output values for {callback_id}.
              Expected {len(output_lists)}, got {len(output_values)}
              """
          )
  
      for i, output_spec in enumerate(output_lists):
          if isinstance(output_spec, list):
              output_value = output_values[i]
              if not isinstance(output_value, (list, tuple)):
                  raise exceptions.InvalidCallbackReturnValue(
                      dedent(
                          f"""
                          The callback {callback_id} output {i} is a wildcard multi-output.
                          Expected the output type to be a list or tuple but got:
                          {output_value!r}.
                          output spec: {output_spec!r}
                          """
                      )
                  )
  
              if len(output_value) != len(output_spec):
                  raise exceptions.InvalidCallbackReturnValue(
                      dedent(
                          f"""
                          Invalid number of output values for {callback_id} item {i}.
                          Expected {len(output_spec)}, got {len(output_value)}
                          output spec: {output_spec!r}
                          output value: {output_value!r}
                          """
                      )
                  )
  
imports: from collections.abc import MutableSequence
  import re
  from textwrap import dedent
  from keyword import iskeyword
  import flask
  from ._grouping import grouping_len, map_grouping
  from .development.base_component import Component
  from .None import exceptions
  from ._utils import patch_collections_abc, stringify_id, to_json, coerce_to_list, clean_property_name
label_desc: Use image node_id 7 for calling a global function with example usage: validate_multi_return(output_lists, output_values, callback_id) without return types