class_docstr: Abstraction of a NLU pipeline unit
  
  Pipeline processing units such as intent parsers, intent classifiers and
  slot fillers must implement this class.
  
   A :class:`ProcessingUnit` is associated with a *config_type*, which
  represents the :class:`.ProcessingUnitConfig` used to initialize it.
code: def __init__(self, config, **shared):
      if config is None:
          self.config = self.default_config()
      elif isinstance(config, ProcessingUnitConfig):
          self.config = config
      elif isinstance(config, dict):
          self.config = self.config_type.from_dict(config)
      else:
          raise ValueError("Unexpected config type: %s" % type(config))
      if self.config is not None:
          self.config.set_unit_name(self.unit_name)
      self.builtin_entity_parser = shared.get(BUILTIN_ENTITY_PARSER)
      self.custom_entity_parser = shared.get(CUSTOM_ENTITY_PARSER)
      self.resources = shared.get(RESOURCES)
      self.random_state = check_random_state(shared.get(RANDOM_STATE))
  
imports: from __future__ import unicode_literals
  import io
  import json
  import shutil
  from abc import ABCMeta, abstractmethod, abstractproperty
  from builtins import str, bytes
  from pathlib import Path
  from future.utils import with_metaclass
  from snips_nlu.common.abc_utils import abstractclassmethod, classproperty
  from snips_nlu.common.io_utils import temp_dir, unzip_archive
  from snips_nlu.common.registrable import Registrable
  from snips_nlu.common.utils import json_string, check_random_state
  from snips_nlu.constants import BUILTIN_ENTITY_PARSER, CUSTOM_ENTITY_PARSER, CUSTOM_ENTITY_PARSER_USAGE, RESOURCES, LANGUAGE, RANDOM_STATE
  from snips_nlu.entity_parser import BuiltinEntityParser, CustomEntityParser, CustomEntityParserUsage
  from snips_nlu.exceptions import LoadingError
  from snips_nlu.pipeline.configs import ProcessingUnitConfig
  from snips_nlu.pipeline.configs.config import DefaultProcessingUnitConfig
  from snips_nlu.resources import load_resources
label_desc: Use image node_id 1 to create a new ProcessingUnit object from inherited base classes:  with example: obj = ProcessingUnit(config)