code: def read_from_kafka(consume_topic: str):
      # Spark Streaming DataFrame, connect to Kafka topic served at host in bootrap.servers option
      df_stream = (
          spark.readStream.format("kafka")
          .option(
              "kafka.bootstrap.servers", "localhost:9092,broker:29092"
          )
          .option("subscribe", consume_topic)
          .option("startingOffsets", "earliest")
          .option("checkpointLocation", "checkpoint")
          .load()
      )
      return df_stream
  
file_path: data-engineering-zoomcamp/06-streaming/python/streams-example/pyspark/streaming.py
imports: from pyspark.sql import SparkSession
  import pyspark.sql.functions
  from settings import RIDE_SCHEMA, CONSUME_TOPIC_RIDES_CSV, TOPIC_WINDOWED_VENDOR_ID_COUNT
label_desc: Use image node_id 1 for calling a global function with example usage: read_from_kafka(consume_topic) and returns: df_stream