code: def _get_decomposition_checker(supposed_kwargs, output_length):
      """Factory function whose output asserts that all entries in ``supposed_kwargs`` match entries in the kwargs-dictionary.
  
      This is a utility function used to automate testing of the object oriented interface.
  
      Arguments
      ---------
      supposed_kwargs : dict
          All keyword arguments that should be in the kwargs dict whenever the output function is called
          and their supposed value.
      output_length : int
          The number of outputs from the function
  
      Returns
      -------
      function
          Function that iterates over the supposed_kwarg dictionary and checks that each key and value
          matches those of the function call.
      """
  
      def decomposition_function(*args, **kwargs):
          for argument, supposed_default in supposed_kwargs.items():
              np.testing.assert_(
                  argument in kwargs,
                  "All arguments with a default must be passed as keyword argument when the decomposition class calls the decomposition function",
              )
              np.testing.assert_(kwargs[argument] == supposed_default)
          return [None for _ in range(output_length)]
  
      return decomposition_function
  
file_path: tensorly/tensorly/testing.py
imports: import sys
  from inspect import getfullargspec
  import numpy
  from tensorly import backend
label_desc: Use image node_id 6 for calling a global function with example usage: _get_decomposition_checker(supposed_kwargs, output_length) and returns: decomposition_function, unknown