That's just a high level example of what a flow could potentially look like.
Im pretty sure the create_cluster in that case is exemplifying creating a full blown cluster. If you were in AWS you could create a Spark cluster by using AWS EMR, from the code you could use boto3 to create the cluster, and you could send spark jobs to it via EMR Steps or by using Apache Livy for example.