call the method connection.ops.prepare_sql_script with 2 arguments: return value of the function fp.read,
output . extend ( connection . ops . prepare_sql_script ( fp . read ( ) , _allow_fallback = True ) )