code: def CopyComputeReordering(
      max_copy_movements: Optional[int] = None,
      reorder_by_cycles: Optional[bool] = None,
  ) -> tvm.IRModule:
      """
      Reorders copy and compute nodes in such a way that independent DMA copies
      and computes happen in parallel.
      Copies to buffers with local scope are not reordered since they copy LUT
      into the SHRAM and that already happens in parallel with copying weights into
      the weights encoder.
  
      If reorder_by_cycles is set, we use the compute_cycles_hint to decide the reordering. If it is
      not set, we move the copies up by a fixed number of movements, either by max_copy_movements if
      it is specified, or by default value of 1.
  
      If reordering based on the cycle count is enabled, we try to achieve further copy latency
      hiding with a two step algorithm:
      (1) Move all the global copies (i.e. copies that copy a constant into SRAM for conv2d or
      depthwise_conv2d) above a preceding compute op. If in general the computes take longer than
      copies, this should be enough to hide the copy latencies.
      (2) If there are some global copies that take longer than the computes, we might be able to
      hide them further by moving them further up in a graph since in general there are more compute
      ops than copy ops in a graph (as only conv2d and depthwise_conv2d have constants associated
      with them). The algortithm checks whether a copy is hidden and if it is not, it checks if a
      preceding compute op has a preceding copy and if it doesn't it moves the copy that we try to
      hide further up. It keeps moving the copy until it can't move it any further or until the
      latency is hidden.
  
      Parameters
      ----------
      max_copy_movements: Optional[int]
          The maximum number of movements allowed for a copy.
          If None, the pass context option
          tir.contrib.ethos-u.copy_compute_reordering_max_copy_movements
          is used if provided, otherwise the default value will be 1.
  
      reorder_by_cycles: Optional[bool]
          Whether to reorder the computes and copies based on the cycle hint.
          If None, the pass context option
          tir.contrib.ethos-u.copy_compute_reordering_reorder_by_cycles
          is used if provided, otherwise the default value will be False.
  
      Returns
      -------
      tvm.IRModule
          The new module with copy and compute nodes reordered.
      """
      return _ffi_api.CopyComputeReordering(
          max_copy_movements, reorder_by_cycles
      )
  
imports: from collections import namedtuple
  from typing import Optional
  import numpy
  from ethosu.vela import api
  import tvm
  from tvm.relay.backend.contrib.ethosu import vela_api
  from tvm.relay.backend.contrib.ethosu import tir_to_cs_translator
  from .convolution import get_conv2d_params
  from .depthwise import get_depthwise_conv2d_params
  from .pooling import get_pooling_params
  from .binary_elementwise import get_binary_elementwise_params
  from .identity import get_identity_params
  from .unary_elementwise import get_unary_elementwise_params
  from .transform import get_copy_params
  from .producers_consumers import ProducersConsumers
  from ..None import _ffi_api
label_desc: Use image node_id 9 for calling a global function with example usage: CopyComputeReordering(max_copy_movements, reorder_by_cycles) and returns: _ffi_api