code: def legalize_clip(attrs, inputs, tinfos):
      """Removes clip operators with bounds matching the defaults for their dtype.
  
      This is already done after alter_op by TVM's simplification passes, but certain QNN operator
      implementations (like Cortex-M) need it to be done earlier in legalization.
      """
  
      if (
          hasattr(inputs[0], "op")
          and hasattr(inputs[0].op, "name")
          and inputs[0].op.name == "qnn.requantize"
      ):
          dtype_info = np.iinfo(tinfos[0].dtype)
          if (
              dtype_info.min == attrs.a_min
              and dtype_info.max == attrs.a_max
          ):
              return inputs[0]
  
      return None
  
file_path: tvm/python/tvm/relay/qnn/op/_qnn.py
imports: import numpy
  from tvm import topi
  from ..None import strategy
  from ...op.op import register_compute
  from ...op.op import register_injective_schedule
  from ...op.op import OpPattern, register_alter_op_layout, register_legalize, register_pattern, register_strategy
label_desc: Use image node_id 3 for calling a global function with example usage: legalize_clip(attrs, inputs, tinfos) and returns: None, inputs