class_docstr: This class wraps a cache and a generator which iterates over all primitive
  classes. When deserializing a primitive if it is not in the cache then we
  iterate until it is found, adding every seen class to the cache. When
  deserializing the next primitive the iteration resumes where it left off. This
  means that we never visit a class more than once.
class_docstr_tok: ["This","class","wraps","a","cache","and","a","generator","which","iterates","over","all","primitive","classes",".","When","deserializing","a","primitive","if","it","is","not","in","the","cache","then","we","iterate","until","it","is","found",",","adding","every","seen","class","to","the","cache",".","When","deserializing","the","next","primitive","the","iteration","resumes","where","it","left","off",".","This","means","that","we","never","visit","a","class","more","than","once","."]
docstr: Construct a primitive from the given dictionary (output from
  serialize_primitive).
docstr_tok: ["Construct","a","primitive","from","the","given","dictionary","(","output","from","serialize_primitive",")","."]
code: def deserialize_primitive(self, primitive_dict):
      """
      Construct a primitive from the given dictionary (output from
      serialize_primitive).
      """
      class_name = primitive_dict["type"]
      module_name = primitive_dict["module"]
      class_cache_key = (class_name, module_name.split(".")[0])
  
      if class_cache_key in self.class_cache:
          cls = self.class_cache[class_cache_key]
      else:
          cls = self._find_class_in_descendants(class_cache_key)
  
      if not cls:
          raise RuntimeError(
              'Primitive "%s" in module "%s" not found'
              % (class_name, module_name),
          )
      arguments = primitive_dict["arguments"]
      if cls == NumberOfCommonWords and "word_set" in arguments:
          # We converted word_set from a set to a list to make it serializable,
          # we should convert it back now.
          arguments["word_set"] = set(arguments["word_set"])
      primitive_instance = cls(**arguments)
  
      return primitive_instance
  
imports: import importlib.util
  import os
  from inspect import getfullargspec, getsource, isclass
  from typing import Dict, List
  import pandas
  from woodwork import list_logical_types, list_semantic_tags, type_system
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import NaturalLanguage
  import featuretools
  from featuretools.primitives import NumberOfCommonWords
  from featuretools.primitives.base import AggregationPrimitive, PrimitiveBase, TransformPrimitive
  from featuretools.utils.gen_utils import Library, find_descendents
label_desc: Use image node_id 2 for calling the PrimitivesDeserializer obj's underlying member method code with example usage: obj.deserialize_primitive(primitive_dict) and returns: primitive_instance