code: def unary_agg_func_fixture():
      """
      Register a unary aggregate function (mean)
      """
      from pyarrow import compute as pc
  
      def func(ctx, x):
          return pa.scalar(np.nanmean(x))
  
      func_name = "mean_udf"
      func_doc = {
          "summary": "y=avg(x)",
          "description": "find mean of x",
      }
  
      pc.register_aggregate_function(
          func,
          func_name,
          func_doc,
          {
              "x": pa.float64(),
          },
          pa.float64(),
      )
      return func, func_name
  
file_path: arrow/python/pyarrow/conftest.py
imports: import pytest
  import pyarrow
  from pyarrow import Codec
  from pyarrow import fs
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: unary_agg_func_fixture() and returns: func,  func_name, pa