<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():
 """ creates database if necessary """

    db = get_db()
    response = db.query('SHOW DATABASES')
    items = list(response.get_points('databases'))
    databases = [database['name'] for database in items]
    # if database does not exists, create it
    if settings.INFLUXDB_DATABASE not in databases:
        db.create_database(settings.INFLUXDB_DATABASE)
        print('Created inlfuxdb database {0}'.format(settings.INFLUXDB_DATABASE))