code: def convert_image_resize2d(attrs, inputs, tinfos, desired_layouts):
      """Convert Layout pass registration for image resize2d op.
  
      Parameters
      ----------
      attrs : tvm.ir.Attrs
          Attributes of current resize op
      inputs : list of tvm.relay.Expr
          The args of the Relay expr to be legalized
      tinfos : list of types
          List of input and output types
      desired_layouts : list of layout strings
          List of layouts defining our desired
          layout for the data input.
      Returns
      -------
      result : tvm.relay.Expr
          The transformed expr
      """
  
      new_attrs = dict(attrs)
      assert (
          len(desired_layouts) == 1
      ), "Only one desired layout is expected"
      desired_layout = str(desired_layouts[0])
      assert desired_layout != "default", "Layout cannot be default"
      new_attrs["layout"] = desired_layout
      return resize2d(*inputs, **new_attrs)
  
imports: from __future__ import absolute_import
  from tvm.te.hybrid import script
  from tvm.runtime import convert
  from tvm import topi
  from tvm.topi.utils import get_const_tuple
  from ..None import op
  from ..None import strategy
  from ..op import OpPattern
  from .image import resize2d
label_desc: Use image node_id 6 for calling a global function with example usage: convert_image_resize2d(attrs, inputs, tinfos, desired_layouts) and returns: resize2d