code: def write_compute(
      tensor: te.Tensor,
      zero_point: int,
      scale: float,
      layout: Optional[str] = None,
      attrs: dict = None,
  ) -> te.Tensor:
      """A tensor expression which represents a write.
  
      Parameters
      ----------
      tensor : te.Tensor
          The tensor to write.
      zero_point : int
          The zero point of the tensor.
      scale : float
          The scale of the tensor.
      layout : Optional[str]
          The layout of the tensor, either NHWC or NHCWB16.
      attrs : dict, optional
          Additional attributes to add to the compute op.
  
      Returns
      -------
      te.Tensor
          The tensor having been written.
  
      """
  
      if not attrs:
          attrs = {}
  
      write_attrs = {
          "op": "ethosu_write",
          "zero_point": zero_point,
          "scale": scale,
      }
  
      if layout:
          assert layout in {"NHWC", "NHCWB16"}
          write_attrs["layout"] = layout
  
      write_attrs = {**write_attrs, **attrs}
      return te.compute(
          tensor.shape,
          lambda *i: tensor(*i),
          name="ethosu_write",
          attrs=write_attrs,
      )
  
file_path: tvm/python/tvm/relay/backend/contrib/ethosu/te/dma.py
imports: from typing import Callable, Tuple, Optional, List
  import tvm
  from tvm import te
  from tvm.topi.utils import equal_const_int
label_desc: Use image node_id 3 for calling a global function with example usage: write_compute(tensor, zero_point, scale, layout, attrs) and returns: te