code: def affine_transpose_weight(params, info, func):
      if "Affine" in info._convert_context:
          transposed = info._convert_context["Affine"]
      else:
          transposed = set()
  
      for idx in params:
          weight_name = func.input[idx]
          if weight_name in transposed:
              return
          w_shape = info._variables[weight_name].shape.dim[:]
          if weight_name in info._parameters:
              w_data = info._parameters[weight_name]
              transposed.add(weight_name)
              info._convert_context["Affine"] = transposed
          else:
              print(
                  "WARNING: affine weight is not transposed. Since it is not included in .nntxt/.nnp"
              )
          i_num = w_shape[0]
          data = np.array(w_data.data[:])
          data = data.reshape(int(i_num), -1)
          data = np.transpose(data)
          del info._parameters[weight_name].data[:]
          info._parameters[weight_name].data.extend(data.flatten())
  
file_path: nnabla/python/src/nnabla/utils/converter/nnablart/utils.py
imports: import collections
  from functools import partial
  import nnabla.utils.converter
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: affine_transpose_weight(params, info, func) without return types