code: def compute_ofm_shape(
      ifm_shape,
      padding,
      kernel_shape,
      strides,
      dilation=[1, 1],
      channel_padding=[0, 0],
  ):
      assert len(strides) == 2
      assert len(dilation) == 2
      assert len(kernel_shape) == 2
      if isinstance(padding, tuple):
          h = (
              ifm_shape[1]
              - (kernel_shape[0] - 1) * dilation[0]
              + padding[0]
              + padding[2]
          ) // strides[0]
          w = (
              ifm_shape[2]
              - (kernel_shape[1] - 1) * dilation[1]
              + padding[1]
              + padding[3]
          ) // strides[1]
      elif padding.lower() == "valid":
          h = math.ceil(
              (ifm_shape[1] - (kernel_shape[0] - 1) * dilation[0])
              / strides[0]
          )
          w = math.ceil(
              (ifm_shape[2] - (kernel_shape[1] - 1) * dilation[1])
              / strides[1]
          )
      elif padding.lower() == "same":
          h = math.ceil(ifm_shape[1] / strides[0])
          w = math.ceil(ifm_shape[2] / strides[1])
      ofm_shape = [
          ifm_shape[0],
          h,
          w,
          ifm_shape[3] + channel_padding[0] + channel_padding[1],
      ]
      return ofm_shape
  
imports: from typing import List
  import os
  import struct
  import numpy
  import math
  from enum import IntEnum
  import tensorflow
  from ethosu.vela.register_command_stream_generator import CmdMode
  from ethosu.vela.register_command_stream_generator import cmd0
  from ethosu.vela.register_command_stream_generator import cmd1
  import tvm
  from tvm import relay
  import tvm.relay.backend.contrib.ethosu.op
  from tvm.topi.nn.utils import get_pad_tuple
  from tvm.relay.expr_functor import ExprMutator
  from tvm.relay.op.annotation import compiler_begin, compiler_end
  from tvm.relay.backend.contrib.ethosu import preprocess
  import tvm.relay.testing.tf
  from tvm import WorkspaceMemoryPools, WorkspacePoolInfo, PoolInfoProperties
  from tvm.relay.op.contrib.ethosu import partition_for_ethosu
  from tvm.testing.aot import AOTCompiledTestModel, AOTDataLinkage, AOTTestModel, AOTTestRunner, compile_models, run_and_check
label_desc: Use image node_id 16 for calling a global function with example usage: compute_ofm_shape(ifm_shape, padding, kernel_shape, strides, dilation, channel_padding) and returns: ofm_shape