code: def awaitTermination(
      self, timeout: Optional[int] = None
  ) -> Optional[bool]:
      cmd = pb2.StreamingQueryCommand()
      if timeout is not None:
          if not isinstance(timeout, (int, float)) or timeout <= 0:
              raise PySparkValueError(
                  error_class="VALUE_NOT_POSITIVE",
                  message_parameters={
                      "arg_name": "timeout",
                      "arg_value": type(timeout).__name__,
                  },
              )
          cmd.await_termination.timeout_ms = int(timeout * 1000)
          terminated = self._execute_streaming_query_cmd(
              cmd
          ).await_termination.terminated
          return terminated
      else:
          await_termination_cmd = (
              pb2.StreamingQueryCommand.AwaitTerminationCommand()
          )
          cmd.await_termination.CopyFrom(await_termination_cmd)
          self._execute_streaming_query_cmd(cmd)
          return None
  
imports: from pyspark.sql.connect.utils import check_dependencies
  import json
  import sys
  import pickle
  from typing import TYPE_CHECKING, Any, cast, Dict, List, Optional
  from pyspark.errors import StreamingQueryException, PySparkValueError
  import pyspark.sql.connect.proto
  from pyspark.serializers import CloudPickleSerializer
  from pyspark.sql.connect import proto
  from pyspark.sql.connect.utils import get_python_ver
  from pyspark.sql.streaming import StreamingQueryListener
  from pyspark.sql.streaming.query import StreamingQuery, StreamingQueryManager
  from pyspark.errors.exceptions.connect import StreamingQueryException
  from pyspark.errors import PySparkPicklingError
label_desc: Use image node_id 6 for calling the StreamingQuery obj's underlying member method code with example usage: obj.awaitTermination(timeout) and returns: terminated, None