'If the filter exists, returns its value. Otherwise sets it to value.
If the property name is the empty string or not a string, raises
BadPropertyError. If the value is not a supported type, raises
BadValueError.'

def setdefault(self, filter, value):

    datastore_types.ValidateProperty('    ', value)
    self._CheckFilter(filter, value)
    return dict.setdefault(self, filter, value)
