code: def _ConvertDictToObject(self, json_dict):
      
      # Use __type__ to indicate the object class type.
      class_type = json_dict.get('__type__', None)
  
      if class_type not in self._CLASS_TYPES:
        raise TypeError('Missing path specification object type.')
  
      # Remove the class type from the JSON dict since we cannot pass it.
      del json_dict['__type__']
  
      type_indicator = json_dict.get('type_indicator', None)
      if type_indicator:
        del json_dict['type_indicator']
  
      # Convert row_condition back to a tuple.
      if 'row_condition' in json_dict:
        json_dict['row_condition'] = tuple(json_dict['row_condition'])
  
      return path_spec_factory.Factory.NewPathSpec(type_indicator, **json_dict)
docs: Converts a JSON dict into a path specification object.
  
      The dictionary of the JSON serialized objects consists of:
      {
          '__type__': 'PathSpec'
          'type_indicator': 'OS'
          'parent': { ... }
          ...
      }
  
      Here '__type__' indicates the object base type in this case this should
      be 'PathSpec'. The rest of the elements of the dictionary make up the
      path specification object properties. Note that json_dict is a dict of
      dicts and the _ConvertDictToObject method will be called for every dict.
      That is how the path specification parent objects are created.
  
      Args:
        json_dict (dict[str, object]): JSON serialized objects.
  
      Returns:
        PathSpec: a path specification.
  
      Raises:
        TypeError: if the JSON serialized object does not contain a '__type__'
            attribute that contains 'PathSpec'.