code: def assert_valid(self, instance, value=None):
          
          valid = super(Dictionary, self).assert_valid(instance, value)
          if not valid:
              return False
          if value is None:
              value = instance._get(self.name)
          if value is None:
              return True
          if self.key_prop or self.value_prop:
              for key, val in iteritems(value):
                  if self.key_prop:
                      self.key_prop.assert_valid(instance, key)
                  if self.value_prop:
                      self.value_prop.assert_valid(instance, val)
          return True
docs: Check if dict and contained properties are valid