code: def parse_global_pooling_layer(
      reader, node, inputs_map, input_shapes, graph, config
  ):
      layer = {}
      layer["name"] = node.name
      layer["inputs"] = get_onnx_input_name(node, graph)
      layer["class_name"] = node.op_type
      layer["data_format"] = "channels_first"
  
      # Sonme default parameters for global pooling
      layer["n_out"] = 1
      layer["pad_left"] = layer["pad_right"] = 0
      layer["stride"] = 0
  
      info = layer["class_name"].replace("Pool", "")
  
      if len(input_shapes[0]) == 3:  # 1D
          layer["class_name"] = info + "Pooling1D"
  
          layer["n_in"] = input_shapes[0][2]
          layer["n_filt"] = input_shapes[0][1]
  
      elif len(input_shapes[0]) == 4:
          layer["class_name"] = info + "Pooling2D"
  
          layer["n_filt"] = input_shapes[0][1]
          layer["in_height"] = input_shapes[0][2]
          layer["in_width"] = input_shapes[0][3]
  
      output_shape = [input_shapes[0][0], layer["n_filt"]] + [1] * (
          len(input_shapes[0]) - 2
      )
  
      return layer, output_shape
  
label_desc: Use image node_id 2 for calling a global function with example usage: parse_global_pooling_layer(reader, node, inputs_map, input_shapes, graph, config) and returns: layer,  output_shape