def __delitem__(self, key):
        if self.minimum_fields is None:
            try:
                dict.__delitem__(self, key)
                return
            except KeyError:
                if not self.may_contain(key):
                    raise TypeError(
                        'May not request del for unknown key %r on %s %r' %
                        (key, type(self).__name__, self.name))
                raise
        if key in self:
            optional = self[key].optional
        else:
            schema = self._field_schema_for(key)
            if schema is None:
                raise TypeError(
                    'May not request del for unknown key %r on %s %r' %
                    (key, type(self).__name__, self.name))
            optional = schema.optional
        if not optional:
            raise TypeError('May not delete required key %r on %s %r' %
                            (key, type(self).__name__, self.name))
        dict.__delitem__(self, key)
dataset/ETHPy150Open jek/flatland/flatland/schema/containers.py/SparseDict.__delitem__/original