code: def dumps(cls, value):
      '''returns mapping typed serialized `value`.'''
      if not hasattr(value, '__getitem__') or not hasattr(value, 'iteritems'):
        value = {cls.sentinel: value}
      return valuf dumps(cls, value):
      '''returns mapping typed serialized `value`.'''
      if not hasattr(value, '__getitem__') or not hasattr(value, 'iteritems'):
        value = {cls.sentinel: value}
      return value
docs: returns mapping typed serialized `value`.