code: def test_paddle_avg_pool2d(
      dtype_x_k_s,
      exclusive,
      ceil_mode,
      data_format,
      *,
      test_flags,
      backend_fw,
      frontend,
      fn_tree,
      on_device,
  ):
      input_dtype, x, kernel, stride, padding = dtype_x_k_s
  
      if data_format == "NCHW":
          x[0] = x[0].reshape(
              (
                  x[0].shape[0],
                  x[0].shape[3],
                  x[0].shape[1],
                  x[0].shape[2],
              )
          )
      if len(stride) == 1:
          stride = (stride[0], stride[0])
      if padding == "SAME":
          padding = test_pooling_functions.calculate_same_padding(
              kernel, stride, x[0].shape[2:]
          )
      else:
          padding = (0, 0)
      helpers.test_frontend_function(
          input_dtypes=input_dtype,
          test_flags=test_flags,
          backend_to_test=backend_fw,
          frontend=frontend,
          fn_tree=fn_tree,
          on_device=on_device,
          x=x[0],
          kernel_size=kernel,
          stride=stride,
          padding=padding,
          ceil_mode=ceil_mode,
          exclusive=exclusive,
          divisor_override=None,
          data_format=data_format,
      )
  
file_path: ivy/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_pooling.py
imports: from hypothesis import strategies
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_frontend_test
  from ivy_tests.test_ivy.test_frontends.test_torch.test_nn.test_functional import test_pooling_functions
label_desc: Use image node_id 6 for calling a global function with example usage: test_paddle_avg_pool2d(dtype_x_k_s, exclusive, ceil_mode, data_format) without return types