code: def from_path(cls, path, **_):
      with (path / "metadata.json").open(encoding="utf8") as f:
          metadata = json.load(f)
      fitted = metadata["fitted"]
      cfg = cls.config_type()  # pylint:disable=no-value-for-parameter
      unit = cls(cfg)
      unit.fitted = fitted
      return unit
  
imports: from __future__ import unicode_literals
  import json
  import shutil
  import sys
  import tempfile
  import traceback
  from builtins import object
  from contextlib import contextmanager
  from pathlib import Path
  from unittest import TestCase
  from snips_nlu.common.utils import json_string, unicode_string
  from snips_nlu.entity_parser.entity_parser import EntityParser
  from snips_nlu.intent_classifier import IntentClassifier
  from snips_nlu.intent_parser import IntentParser
  from snips_nlu.resources import load_resources
  from snips_nlu.result import empty_result
  from snips_nlu.slot_filler import SlotFiller
label_desc: Use image node_id 4 for calling the MockProcessingUnitMixin obj's underlying member method code with example usage: obj.from_path(cls, path) and returns: unit