code: def test_ethosu_unary_elementwise_type_inference(
      ifm_shape,
      ifm_layout,
      ofm_shape,
      ofm_layout,
      operator_type,
      data_type,
  ):
      ifm = relay.var("ifm", shape=ifm_shape, dtype=data_type)
      ofm_channels = 33
      unary_elementwise = make_ethosu_unary_elementwise(
          ifm,
          ofm_channels,
          operator_type,
          ifm_layout=ifm_layout,
          ofm_layout=ofm_layout,
      )
      f = relay.Function([ifm], unary_elementwise)
      f = run_opt_pass(f, relay.transform.InferType())
      assert tuple(f.body.checked_type.shape) == ofm_shape
  
imports: import pytest
  from tvm import relay, TVMError
  from tvm.relay.testing import run_opt_pass
  from .infra import make_ethosu_conv2d
  from .infra import make_ethosu_depthwise_conv2d
  from .infra import make_ethosu_pooling
  from .infra import make_ethosu_binary_elementwise
  from .infra import make_ethosu_identity
  from .infra import make_ethosu_unary_elementwise
label_desc: Use image node_id 18 for calling a global function with example usage: test_ethosu_unary_elementwise_type_inference(ifm_shape, ifm_layout, ofm_shape, ofm_layout, operator_type, data_type) without return types