<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_user(self, username, password):
 """ Creates a user in the CouchDB instance with the username `username` and password `password` """

        user_id = "org.couchdb.user:" + username
        res = self["_users"].resource.put(
            user_id, body=json.dumps({
                "_id": user_id,
                "name": username,
                "roles": [],
                "type": "user",
                "password": password,
                "farms": []
            })
        )
        if res[0] == 409:
            raise RuntimeError(
                'The username "{}" is already taken'.format(username)
            )
        elif res[0] != 201:
            raise RuntimeError(
                "Failed to create user ({}): {}".format(
                    res.status_code, res.content
                )
            )