code: def input_shape(
      self,
      output_shape,
      kernel,
      padding,
      stride,
      dilation,
      op_layout,
      output_layout,
  ):
      # Input shape without any padding; 'ceil' is being ignored from calculation:
      if op_layout == "NHWC":
          o_b, o_h, o_w, o_c = output_shape
      else:
          o_b, o_c, o_h, o_w = output_shape
      d_h, d_w = dilation
      s_h, s_w = stride
      k_h, k_w = kernel
      pad_before_h, pad_before_w = padding[:2]
      pad_after_h, pad_after_w = padding[2:]
  
      if (
          output_layout == "n11c-2048c-2d"
          or output_layout == "nc11-2048c-2d"
          or output_layout == "n11c-1024c-2d"
          or output_layout == "nc11-1024c-2d"
      ):
          assert (
              o_h == 1 and o_w == 1
          ), "Output height and width must be 1"
  
      in_h = (
          (o_h - 1) * s_h
          + d_h * (k_h - 1)
          + 1
          - pad_before_h
          - pad_after_h
      )
      in_w = (
          (o_w - 1) * s_w
          + d_w * (k_w - 1)
          + 1
          - pad_before_w
          - pad_after_w
      )
  
      if op_layout == "NHWC":
          return [o_b, in_h, in_w, o_c]
      else:
          return [o_b, o_c, in_h, in_w]
  
file_path: tvm/tests/python/contrib/test_hexagon/topi/slice_op/test_avg_pool2d_slice.py
imports: import numpy
  from typing import *
  from tvm import te
  import tvm.testing
  from tvm.topi.testing import poolnd_python
  from tvm.contrib.hexagon.session import Session
  import tvm.topi.hexagon.slice_ops
  import tvm.topi.hexagon.qnn
  from tvm.contrib.hexagon import allocate_hexagon_array
  import pytest
  from ...infrastructure import transform_numpy, quantize_np, get_hexagon_target
  from ...pytest_util import get_multitest_ids, create_populated_numpy_ndarray, TensorContentRandom
label_desc: Use image node_id 2 for calling the TestAvgPool2dSlice obj's underlying member method code with example usage: obj.input_shape(output_shape, kernel, padding, stride, dilation, op_layout, output_layout) and returns: list, list