code: def iter_ser_to_iter_ser_pandas_udf_example(
      spark: SparkSession,
  ) -> None:
      from typing import Iterator
  
      import pandas as pd
  
      from pyspark.sql.functions import pandas_udf
  
      pdf = pd.DataFrame([1, 2, 3], columns=["x"])
      df = spark.createDataFrame(pdf)
  
      # Declare the function and create the UDF
      @pandas_udf("long")  # type: ignore[call-overload]
      def plus_one(
          iterator: Iterator[pd.Series],
      ) -> Iterator[pd.Series]:
          for x in iterator:
              yield x + 1
  
      df.select(plus_one("x")).show()
  
file_path: spark/examples/src/main/python/sql/arrow.py
imports: import pandas
  from typing import Iterable
  from pyspark.sql import SparkSession
  from pyspark.sql.pandas.utils import require_minimum_pandas_version, require_minimum_pyarrow_version
label_desc: Use image node_id 4 for calling a global function with example usage: iter_ser_to_iter_ser_pandas_udf_example(spark) without return types