<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def init_sqlite(movies_data, database):
 """Initialize sqlite3 movies database. :param movies_data: Data about movies :type movies_data: tuple[tuple] :param database: Connection to sqlite database with movies data :type database: sqlite3.Connection """

    with database:
        database.execute('CREATE TABLE IF NOT EXISTS movies '
                         '(name text, year int, director text)')
        database.execute('DELETE FROM movies')
        database.executemany('INSERT INTO movies VALUES (?,?,?)', movies_data)