code: def read_images(spark, filenames):
      filenames_rdd = spark.sparkContext.parallelize(filenames)
      schema = StructType(
          [
              StructField("filename", StringType(), True),
              StructField("image", StringType(), True),
          ]
      )
      return filenames_rdd.map(
          lambda x: Row(filename=x, image=read_image_bytes_base64(x))
      ).toDF(schema=schema)
  
file_path: mlflow/examples/flower_classifier/score_images_spark.py
imports: import base64
  import os
  import click
  import pandas
  import pyspark
  from pyspark.sql.types import ArrayType, Row, StringType, StructField, StructType
  import mlflow
  import mlflow.pyfunc
  from mlflow.utils import cli_args
label_desc: Use image node_id 2 for calling a global function with example usage: read_images(spark, filenames) and returns: filenames_rdd