code: def _global_max_pool(x: np.ndarray) -> np.ndarray:
      spatial_shape = np.ndim(x) - 2
      y = x.max(axis=tuple(range(spatial_shape, spatial_shape + 2)))
      for _ in range(spatial_shape):
          y = np.expand_dims(y, -1)
      return y
  
imports: import numpy
  from onnx.reference.op_run import OpRun
label_desc: Use image node_id 1 for calling a global function with example usage: _global_max_pool(x) and returns: y