code: def test_make_grouping_by_key_mixed(mixed_grouping_size):
      grouping, size = mixed_grouping_size
      source = {i: string.ascii_lowercase[i] for i in range(size)}
      result = make_grouping_by_key(grouping, source)
  
      # Check with stack-based algorithm as independent implementation
      groupings = [grouping]
      results = [result]
      while groupings:
          next_grouping = groupings.pop(0)
          next_result = results.pop(0)
          if isinstance(next_grouping, (list, tuple)):
              assert isinstance(next_result, (list, tuple))
              assert len(next_grouping) == len(next_result)
              groupings.extend(next_grouping)
              results.extend(next_result)
          elif isinstance(next_grouping, dict):
              assert isinstance(next_result, dict)
              assert list(next_result) == list(next_grouping)
              groupings.extend(next_grouping.values())
              results.extend(next_result.values())
          else:
              assert source[next_grouping] == next_result
  
imports: from dash.dependencies import Input
  from dash._grouping import flatten_grouping, make_grouping_by_index, grouping_len, map_grouping, make_grouping_by_key, validate_grouping, SchemaTypeValidationError, SchemaLengthValidationError, SchemaKeysValidationError
  from fixtures import scalar_grouping_size, list_grouping_size, dict_grouping_size, mixed_grouping_size
  import string
  import pytest
label_desc: Use image node_id 20 for calling a global function with example usage: test_make_grouping_by_key_mixed(mixed_grouping_size) without return types