code: def test_is_readonly():
      def is_readonly(sql: str) -> bool:
          return HiveEngineSpec.is_readonly_query(ParsedQuery(sql))
  
      assert not is_readonly("UPDATE t1 SET col1 = NULL")
      assert not is_readonly(
          "INSERT OVERWRITE TABLE tabB SELECT a.Age FROM TableA"
      )
      assert is_readonly("SHOW LOCKS test EXTENDED")
      assert is_readonly("SET hivevar:desc='Legislators'")
      assert is_readonly("EXPLAIN SELECT 1")
      assert is_readonly("SELECT 1")
      assert is_readonly("WITH (SELECT 1) bla SELECT * from bla")
  
imports: from unittest import mock
  import pytest
  import pandas
  from sqlalchemy.sql import select
  from superset.db_engine_specs.hive import HiveEngineSpec, upload_to_s3
  from superset.exceptions import SupersetException
  from superset.sql_parse import Table, ParsedQuery
  from tests.integration_tests.test_app import app
label_desc: Use image node_id 15 for calling a global function with example usage: test_is_readonly() and returns: HiveEngineSpec