[SPARK-40160][PYTHON][DOCS] Make pyspark.broadcast examples self-contained
[SPARK-40160][PYTHON][DOCS] Make pyspark.broadcast examples self-contained

### What changes were proposed in this pull request?

This PR proposes to improve the examples in `pyspark.broadcast` by making each example self-contained with a brief explanation and a bit more realistic example.

### Why are the changes needed?

To make the documentation more readable and able to copy and paste directly in PySpark shell.

### Does this PR introduce _any_ user-facing change?

Yes, it changes the documentation.

### How was this patch tested?

Manually ran each doctest.

Closes #37629 from dcoliversun/SPARK-40160.

Authored-by: Qian.Sun <fc1eee9d36d11f1f3cae41c2f5fa69db42b12cd8@gmail.com>
Signed-off-by: Hyukjin Kwon <2680965ad5aae29275c8fb10150cb10f5554e78b@apache.org>

srowen/spark,gengliangwang/spark,vinodkc/spark,ueshin/apache-spark,gengliangwang/spark,hvanhovell/spark,holdenk/spark,gengliangwang/spark,ueshin/apache-spark,srowen/spark,holdenk/spark,dongjoon-hyun/spark,wangyum/spark,shaneknapp/spark,zzcclp/spark,mahak/spark,vinodkc/spark,dongjoon-hyun/spark,gengliangwang/spark,mahak/spark,zzcclp/spark,witgo/spark,witgo/spark,zzcclp/spark,dongjoon-hyun/spark,holdenk/spark,shaneknapp/spark,hvanhovell/spark,apache/spark,HyukjinKwon/spark,zzcclp/spark,mahak/spark,holdenk/spark,vinodkc/spark,ueshin/apache-spark,srowen/spark,shaneknapp/spark,mahak/spark,HyukjinKwon/spark,dongjoon-hyun/spark,ueshin/apache-spark,witgo/spark,HyukjinKwon/spark,shaneknapp/spark,zzcclp/spark,zzcclp/spark,HyukjinKwon/spark,apache/spark,witgo/spark,vinodkc/spark,shaneknapp/spark,srowen/spark,dongjoon-hyun/spark,shaneknapp/spark,shaneknapp/spark,mahak/spark,holdenk/spark,apache/spark,HyukjinKwon/spark,hvanhovell/spark,ueshin/apache-spark,zzcclp/spark,apache/spark,mahak/spark,witgo/spark,srowen/spark,wangyum/spark,dongjoon-hyun/spark,wangyum/spark,hvanhovell/spark,ueshin/apache-spark,hvanhovell/spark,vinodkc/spark,hvanhovell/spark,witgo/spark,apache/spark,srowen/spark,vinodkc/spark,srowen/spark,wangyum/spark,hvanhovell/spark,apache/spark,vinodkc/spark,gengliangwang/spark,wangyum/spark,HyukjinKwon/spark,dongjoon-hyun/spark,holdenk/spark,gengliangwang/spark,mahak/spark,gengliangwang/spark,HyukjinKwon/spark,ueshin/apache-spark,witgo/spark,apache/spark,wangyum/spark,wangyum/spark,holdenk/spark