code: def apply_convs(
      input,
      scale_factor,
      in_sz,
      out_sz,
      weights,
      dim,
      pad_sz,
      pad_mode,
      fw,
  ):
      # for this operations we assume the resized dim is the last one.
      # so we transpose and will transpose back after multiplying
      input = fw_swapaxes(input, dim, -1, fw)
  
      # the stride for all convs is the denominator of the scale factor
      stride, num_convs = (
          scale_factor.denominator,
          scale_factor.numerator,
      )
  
      # prepare an empty tensor for the output
      tmp_out_shape = list(input.shape)
      tmp_out_shape[-1] = out_sz
      tmp_output = fw_empty(tuple(tmp_out_shape), fw, input.device)
  
      # iterate over the conv operations. we have as many as the numerator
      # of the scale-factor. for each we need boundaries and a filter.
      for conv_ind, (pad_sz, filt) in enumerate(zip(pad_sz, weights)):
          # apply padding (we pad last dim, padding can be negative)
          pad_dim = input.ndim - 1
          tmp_input = fw_pad(input, fw, pad_sz, pad_mode, dim=pad_dim)
  
          # apply convolution over last dim. store in the output tensor with
          # positional strides so that when the loop is comlete conv results are
          # interwind
          tmp_output[..., conv_ind::num_convs] = fw_conv(
              tmp_input, filt, stride
          )
  
      return fw_swapaxes(tmp_output, -1, dim, fw)
  
imports: import warnings
  from fractions import Fraction
  from math import ceil
  from typing import Tuple
  import disco_diffusion_clip_rn50.resize_right.interp_methods
label_desc: Use image node_id 7 for calling a global function with example usage: apply_convs(input, scale_factor, in_sz, out_sz, weights, dim, pad_sz, pad_mode, fw) and returns: fw_swapaxes