code: def _check_tuples_multiindex(indexer, args, param):
      """
      Check entries for tuples,
      if indexer is a MultiIndex.
  
      Returns a list of tuples.
      """
      all_tuples = (isinstance(arg, tuple) for arg in args)
      if not all(all_tuples):
          raise TypeError(
              f"{param} must be a list of tuples "
              "when the columns are a MultiIndex."
          )
  
      not_found = set(args).difference(indexer)
      if any(not_found):
          raise KeyError(
              f"Tuples {*not_found,} in the {param} "
              "argument do not exist in the dataframe's columns."
          )
  
      return args
  
imports: import re
  import warnings
  from collections import defaultdict
  from itertools import chain, zip_longest
  from typing import Callable, Optional, Pattern, Union
  import numpy
  import pandas
  import pandas_flavor
  from pandas.api.types import is_categorical_dtype, is_extension_array_dtype, is_list_like
  from pandas.core.dtypes.concat import concat_compat
  from janitor.functions.utils import _computations_expand_grid, get_index_labels
  from janitor.utils import check, refactored_function
label_desc: Use image node_id 16 for calling a global function with example usage: _check_tuples_multiindex(indexer, args, param) and returns: args