code: def orca_context_fixture():
      sc = init_orca_context(cores=8)
  
      def to_array_(v):
          return v.toArray().tolist()
  
      def flatten_(v):
          result = []
          for elem in v:
              result.extend(elem.toArray().tolist())
          return result
  
      spark = SparkSession(sc)
      spark.udf.register("to_array", to_array_, ArrayType(DoubleType()))
      spark.udf.register("flatten", flatten_, ArrayType(DoubleType()))
      yield
      stop_orca_context()
  
imports: import pytest
  from zoo.orca import init_orca_context, stop_orca_context
  from pyspark.sql.types import ArrayType, DoubleType
  from pyspark.sql import SparkSession
label_desc: Use image node_id 1 for calling a global function with example usage: orca_context_fixture() and returns: v, result