code: def check_fitted(model, func):
      """Check if a model is fitted. Raise error if not.
  
      Parameters
      ----------
      model: model
          Any scikit-learn model
  
      func: model
          Function to check if a model is not trained.
      """
      if not func(model):
          raise TypeError("Expected a 'fitted' model for conversion")
  
label_desc: Use image node_id 1 for calling a global function with example usage: check_fitted(model, func) without return types