code: def test_streaming_query_functions_basic(self):
      df = (
          self.spark.readStream.format("rate")
          .option("rowsPerSecond", 10)
          .load()
      )
      query = (
          df.writeStream.format("memory")
          .queryName("test_streaming_query_functions_basic")
          .start()
      )
      try:
          self.assertEqual(
              query.name, "test_streaming_query_functions_basic"
          )
          self.assertTrue(isinstance(query.id, str))
          self.assertTrue(isinstance(query.runId, str))
          self.assertTrue(query.isActive)
          self.assertEqual(query.exception(), None)
          self.assertFalse(query.awaitTermination(1))
          query.processAllAvailable()
          recentProgress = query.recentProgress
          lastProgress = query.lastProgress
          self.assertEqual(lastProgress["name"], query.name)
          self.assertEqual(lastProgress["id"], query.id)
          self.assertTrue(
              any(p == lastProgress for p in recentProgress)
          )
          query.explain()
  
      except Exception as e:
          self.fail(
              "Streaming query functions sanity check shouldn't throw any error. "
              "Error message: " + str(e)
          )
  
      finally:
          query.stop()
  
imports: import os
  import shutil
  import tempfile
  import time
  from pyspark.sql import Row
  from pyspark.sql.functions import lit
  from pyspark.sql.types import StructType, StructField, IntegerType, StringType
  from pyspark.testing.sqlutils import ReusedSQLTestCase
label_desc: Use image node_id 1 for calling the StreamingTestsMixin obj's underlying member method code with example usage: obj.test_streaming_query_functions_basic() without return types