code: def ref_global_average_pooling(x):
      xs = x.shape
      newshape = (xs[0], xs[1], xs[2] * xs[3])
      newx = np.reshape(x, newshape)
      return np.average(newx, 2)[:, :, np.newaxis, np.newaxis]
  
imports: import pytest
  import numpy
  import nnabla.functions
  from nbla_test_utils import function_tester, list_ctx_and_func_name
label_desc: Use image node_id 1 for calling a global function with example usage: ref_global_average_pooling(x) and returns: np