code: def fitted_required(func):
      @wraps(func)
      def func_wrapper(self, *args, **kwargs):
          if not self.fitted:
              raise NotTrained("%s must be fitted" % self.unit_name)
          return func(self, *args, **kwargs)
  
      return func_wrapper
  
imports: from __future__ import unicode_literals
  import importlib
  import json
  import numbers
  import re
  from builtins import bytes, str
  from datetime import datetime
  from functools import wraps
  from pathlib import Path
  from future.utils import text_type
  from snips_nlu.constants import END, ENTITY_KIND, RES_MATCH_RANGE, RES_VALUE, START
  from snips_nlu.exceptions import NotTrained, PersistingError
label_desc: Use image node_id 9 for calling a global function with example usage: fitted_required(func) and returns: func_wrapper, func