parameters: (method)
return_statement: return new_method
docstring: Wrapper method to check the transform list of Compose.
docstring_summary: Wrapper method to check the transform list of Compose.
docstring_tokens: Wrapper method to check the transform list of Compose .
function: def check_compose_call(method):
      """Wrapper method to check the transform list of Compose."""
  
      @wraps(method)
      def new_method(self, *args, **kwargs):
          sig = inspect.signature(method)
          ba = sig.bind_partial(method, *args, **kwargs)
          img = ba.arguments.get("args")
          if img is None:
              raise TypeError(
                  "Compose was called without an image. Fix invocation (avoid it being invoked as Compose([...])()).")
          return method(self, *args, **kwargs)
  
      return new_method
function_tokens: def check_compose_call ( method ) : @ wraps ( method ) def new_method ( self , * args , * * kwargs ) : sig = inspect . signature ( method ) ba = sig . bind_partial ( method , * args , * * kwargs ) img = ba . arguments . get ( "args" ) if img is None : raise TypeError ( "Compose was called without an image. Fix invocation (avoid it being invoked as Compose([...])())." ) return method ( self , * args , * * kwargs ) return new_method