Explain the concept of broadcast variables in Spark.
Broadcast variables are read-only variables that are cached on each worker node in a Spark cluster, rather than being sent over the network with each task. They are used to efficiently share large read-only data structures across all the nodes in a cluster. By broadcasting the variables, Spark avoids sending the data multiple times and reduces the overhead of network communication.
