def create(self, data):
        new_data = self._sanitize_for_create(data)

        try:
            new_thing = self.model(**new_data)
        except __HOLE__:
            raise exceptions.CreateError('bad data type')

        retval = new_thing.jsonify(api=self.api)
        retval['id'] = self._get_new_id()

        self.dictionary[retval['id']] = retval
        return retval
dataset/ETHPy150Open rcbops/opencenter/opencenter/db/abstraction.py/InMemoryAbstraction.create