code: def test_function_doc_validation():
      # validate arity
      in_types = {"scalar": pa.int64()}
      out_type = pa.int64()
  
      # doc with no summary
      func_doc = {"description": "desc"}
  
      def add_const(ctx, scalar):
          return pc.call_function("add", [scalar, 1])
  
      with pytest.raises(
          ValueError, match="Function doc must contain a summary"
      ):
          pc.register_scalar_function(
              add_const, "test_no_summary", func_doc, in_types, out_type
          )
  
      # doc with no description
      func_doc = {"summary": "test summary"}
  
      with pytest.raises(
          ValueError, match="Function doc must contain a description"
      ):
          pc.register_scalar_function(
              add_const, "test_no_desc", func_doc, in_types, out_type
          )
  
imports: import pytest
  import numpy
  import pyarrow
  from pyarrow import compute
label_desc: Use image node_id 23 for calling a global function with example usage: test_function_doc_validation() and returns: pc