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.
docstr: Returns the :class:`.ProcessingUnitConfig` corresponding to
  *unit_config*
docstr_tok: ["Returns","the",":","class",":","`",".ProcessingUnitConfig","`","corresponding","to","*","unit_config","*"]
code: def get_config(cls, unit_config):
      """Returns the :class:`.ProcessingUnitConfig` corresponding to
      *unit_config*"""
      if isinstance(unit_config, ProcessingUnitConfig):
          return unit_config
      elif isinstance(unit_config, dict):
          unit_name = unit_config["unit_name"]
          processing_unit_type = cls.by_name(unit_name)
          return processing_unit_type.config_type.from_dict(unit_config)
      elif isinstance(unit_config, (str, bytes)):
          unit_name = unit_config
          unit_config = {"unit_name": unit_name}
          processing_unit_type = cls.by_name(unit_name)
          return processing_unit_type.config_type.from_dict(unit_config)
      else:
          raise ValueError(
              "Expected `unit_config` to be an instance of "
              "ProcessingUnitConfig or dict or str but found: %s"
              % type(unit_config)
          )
  
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 7 for calling the ProcessingUnit obj's underlying member method code with example usage: obj.get_config(cls, unit_config) and returns: unit_config, processing_unit_type, processing_unit_type