code: def deserialize(cls, value, trusted=False, strict=False,
                      assert_valid=False, **kwargs):
          
          if not isinstance(value, dict):
              raise ValueError('HasProperties must deserialize from dictionary')
          identifier = value.pop('_singleton_id', value.get('name'))
          if identifier is None:
              raise ValueError('Singleton classes must contain identifying name')
          if identifier in cls._SINGLETONS:
              return cls._SINGLETONS[identifier]
          value = value.copy()
          name = value.get('name', None)
          value.update({'name': identifier})
          newinst = super(Singleton, cls).deserialize(
              value,
              trusted=trusted,
              strict=strict,
              assert_valid=assert_valid,
              **kwargs
          )
          if name:
              newinst.name = name
          return newinst
docs: Create a Singleton instance from a serialized dictionary.
  
          This behaves identically to HasProperties.deserialize, except if
          the singleton is already found in the singleton registry the existing
          value is used.
  
          .. note::
  
              If property values differ from the existing singleton and
              the input dictionary, the new values from the input dictionary
              will be ignored