<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_or_create(self, db_name):
 """ Creates the database named `db_name` if it doesn't already exist and return it """

        if not db_name in self:
            res = self.resource.put(db_name)
            if not res[0] == 201:
                raise RuntimeError(
                    'Failed to create database "{}"'.format(db_name)
                )
        return self[db_name]