code: def _adapt_to_highest_lanes(
      *args, intrinsic=None, intrinsic_lanes: int = 0
  ):
      """Apply provided lowering intrinsic to arguments with longer vector data type.
  
      This wrapper will do next actions:
        * Split each argument into chunks with size equal intrinsic_lanes
        * Apply provided intrinsic for each argument chunk
        * Concatenate results
  
      Parameters
      ----------
      args: List[PrimExpr]
          List of arguments. Each arg expression should have vector type with lanes
          equal `intrinsic_lanes * 2**n`.
  
      intrinsic: callable
          Intrinsic implementation to apply.
  
      intrinsic_lanes: int
          Vector length required by intrinsic implementation.
  
      Returns
      -------
      res : PrimExpr
          Resulting expression.
      """
  
      def split_args(args_set):
          res_args_set = []
          for args_chunk in args_set:
              res_args_chunk_l = []
              res_args_chunk_h = []
              for arg_chunk in args_chunk:
                  element, lanes = arg_chunk.dtype.split("x")
                  res_arg_chunk_dtype = f"{element}x{int(lanes) // 2}"
  
                  res_args_chunk_l.append(
                      tvm.tir.op.vectorlow(
                          res_arg_chunk_dtype, arg_chunk
                      )
                  )
                  res_args_chunk_h.append(
                      tvm.tir.op.vectorhigh(
                          res_arg_chunk_dtype, arg_chunk
                      )
                  )
              res_args_set += [res_args_chunk_l, res_args_chunk_h]
  
          return res_args_set
  
      def concat_args(res_chunks):
          merged_res_chunks = []
          for i in range(0, len(res_chunks), 2):
              arg_chunk_l = res_chunks[i]
              arg_chunk_h = res_chunks[i + 1]
              element, lanes = arg_chunk_l.dtype.split("x")
              res_arg_chunk_dtype = f"{element}x{int(lanes) * 2}"
  
              merged_res_chunks.append(
                  tvm.tir.op.vectorcombine(
                      res_arg_chunk_dtype, arg_chunk_l, arg_chunk_h
                  )
              )
  
          return merged_res_chunks
  
      num_chunks = None
      for arg in args:
          _, lanes = arg.dtype.split("x")
          lanes = int(lanes)
          assert lanes % intrinsic_lanes == 0
          if num_chunks is None:
              assert is_power_of_2(lanes // intrinsic_lanes)
              num_chunks = lanes // intrinsic_lanes
  
          assert num_chunks == lanes // intrinsic_lanes
  
      # Split arguments
      lowered_args = [args]
      while len(lowered_args) != num_chunks:
          lowered_args = split_args(lowered_args)
  
      # Intrinsic application
      lowered_res = []
      for l_arg in lowered_args:
          res = intrinsic(*l_arg)
          lowered_res.append(res)
  
      # Result concatenation
      while len(lowered_res) != 1:
          lowered_res = concat_args(lowered_res)
  
      return lowered_res[0]
  
file_path: tvm/python/tvm/topi/hexagon/tensor_intrin.py
imports: import tvm
  from tvm.ir import register_intrin_lowering
  from tvm import te
label_desc: Use image node_id 4 for calling a global function with example usage: _adapt_to_highest_lanes() and returns: lowered_res, res_args_set, merged_res_chunks