code: def calculate_max_singular_value(weight_matrix, u, v):
      """Calculate max singular value by power iteration method.
  
      Args:
          weight_matrix (~chainer.Variable)
          u (numpy.ndarray or cupy.ndarray)
          v (numpy.ndarray or cupy.ndarray)
  
      Returns:
          ~chainer.Variable: Max singular value via power iteration method.
  
      """
      sigma = F.matmul(F.matmul(u, weight_matrix), v)
      return sigma
  
imports: import chainer
  from chainer import backend
  from chainer import configuration
  import chainer.functions
  from chainer import link_hook
  import chainer.links
  from chainer import variable
  import chainerx
label_desc: Use image node_id 3 for calling a global function with example usage: calculate_max_singular_value(weight_matrix, u, v) and returns: sigma