<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_database(self, dbname, partitioned=False, **kwargs):
 """ Creates a new database on the remote server with the name provided and adds the new database object to the client's locally cached dictionary before returning it to the caller. The method will optionally throw a CloudantClientException if the database exists remotely. :param str dbname: Name used to create the database. :param bool throw_on_exists: Boolean flag dictating whether or not to throw a CloudantClientException when attempting to create a database that already exists. :param bool partitioned: Create as a partitioned database. Defaults to ``False``. :returns: The newly created database object """

        new_db = self._DATABASE_CLASS(self, dbname, partitioned=partitioned)
        try:
            new_db.create(kwargs.get('throw_on_exists', False))
        except CloudantDatabaseException as ex:
            if ex.status_code == 412:
                raise CloudantClientException(412, dbname)
        super(CouchDB, self).__setitem__(dbname, new_db)
        return new_db