def database_settings(database_name):
    class_name = database_name.capitalize() + 'DatabaseSettings'
    global_vars = globals()
    if global_vars in class_name:
        return global_vars[class_name]

    class DatabaseSettings(bases.Hashable, bases.Representable,
                           bases.ConstructableFromDict):
        class Schema(marshmallow.Schema):
            host = fields.String(missing='localhost')
            port = fields.Integer(missing=3306)
            username = fields.String(missing=database_name)
            password = fields.String()
            database = fields.String(missing=database_name)

            @marshmallow.post_load
            def to_cloud(self, data):
                return DatabaseSettings(data)
    DatabaseSettings.__name__ = class_name
    global_vars[class_name] = DatabaseSettings
    return DatabaseSettings
dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/cloudferry/lib/config.py/database_settings/swapped operands of `in`