code: def _convert_pooling(
      inexpr, keras_layer, etab, data_layout, input_shape=None
  ):  # pylint: disable=unused-argument
      _check_data_format(keras_layer)
  
      pool_type = type(keras_layer).__name__
      # global pool in keras = global pool + flatten in relay
      global_pool_params = {"layout": data_layout}
  
      if input_shape is None:
          input_shape = keras_layer.input_shape
  
      if pool_type == "GlobalMaxPooling2D":
          return _convert_flatten(
              _op.nn.global_max_pool2d(inexpr, **global_pool_params),
              keras_layer,
              etab,
              data_layout,
          )
      if pool_type == "GlobalAveragePooling2D":
          global_avg_pool2d = _op.nn.global_avg_pool2d(
              inexpr, **global_pool_params
          )
          keep_dims = len(keras_layer.input.shape) == len(
              keras_layer.output.shape
          )
          if keep_dims:
              return global_avg_pool2d
          return _convert_flatten(
              global_avg_pool2d, keras_layer, etab, data_layout
          )
      pool_h, pool_w = keras_layer.pool_size
      stride_h, stride_w = keras_layer.strides
      params = {
          "pool_size": [pool_h, pool_w],
          "strides": [stride_h, stride_w],
          "padding": [0, 0],
          "layout": data_layout,
      }
      if keras_layer.padding == "valid":
          pass
      elif keras_layer.padding == "same":
          in_h = input_shape[1]
          in_w = input_shape[2]
          pad_t, pad_b = _get_pad_pair(in_h, pool_h, stride_h)
          pad_l, pad_r = _get_pad_pair(in_w, pool_w, stride_w)
          params["padding"] = [pad_t, pad_l, pad_b, pad_r]
      else:
          raise tvm.error.OpAttributeUnImplemented(
              f"Padding with {keras_layer.padding} is not supported in operator Pooling."
          )
      if pool_type == "MaxPooling2D":
          return _op.nn.max_pool2d(inexpr, **params)
      if pool_type == "AveragePooling2D":
          params["count_include_pad"] = False
          return _op.nn.avg_pool2d(inexpr, **params)
      raise tvm.error.OpNotImplemented(
          f"Operator {keras_layer} is not supported for frontend Keras."
      )
  
imports: import dis
  import sys
  import numpy
  import tvm
  from tvm.ir import IRModule, TensorType, TupleType
  from ..None import analysis
  from ..None import expr
  from ..None import function
  from ..None import op
  from ...None import nd
  from .common import ExprTable, new_var
label_desc: Use image node_id 17 for calling a global function with example usage: _convert_pooling(inexpr, keras_layer, etab, data_layout, input_shape) and returns: _convert_flatten, _convert_flatten, _op, _op, global_avg_pool2d