def update\_scan\_history():
 # Get list of all BASE TABLE tables in project
 query = f"""
 SELECT CONCAT(table\_schema, '.', table\_name) as table\_name
 FROM `{PROJECT}.information\_schema.tables`
 WHERE table\_type = 'BASE TABLE' AND table\_schema NOT IN ('information\_schema', 'pg\_catalog')
 """
 all\_tables = [row.table\_name for row in bigquery\_client.query(query).result()]

 # Get list of scanned tables
 query = f"""
 SELECT table\_name
 FROM `PROJECT.DATASET.SCAN\_HISTORY`
 """
 scanned\_tables = [row.table\_name for row in bigquery\_client.query(query).result()]

 # Get list of unscanned tables
 unscanned\_tables = list(set(all\_tables) - set(scanned\_tables))

 # Insert unscanned tables into SCAN\_HISTORY table
 current\_time = datetime.datetime.now()
 rows\_to\_insert = [{'table\_name': table, 'last\_scan\_time': None} for table in unscanned\_tables]
 if rows\_to\_insert:
 table = bigquery\_client.get\_table(f"PROJECT.DATASET.SCAN\_HISTORY")
 bigquery\_client.insert\_rows(table, rows\_to\_insert)

what this function do ?
user