code: def orthogonal(rows, cols, gain=1):
      r"""return a (semi) orthogonal matrix, as
      described in `Exact solutions to the nonlinear dynamics of learning in deep
      linear neural networks` - Saxe, A. et al. (2013).
      Args:
          rows: rows
          cols: cols
          gain: optional scaling factor
      Examples:
          >>> orthogonal_(5, 3)
      """
      flattened = paddle.randn((rows, cols))
      if rows < cols:
          flattened = flattened.T
  
      # Compute the qr factorization
      q, r = paddle.linalg.qr(flattened)
      # Make Q uniform according to https://arxiv.org/pdf/math-ph/0609050.pdf
      d = paddle.diag(r, 0)
      q *= d.sign()
  
      if rows < cols:
          q = q.T
      q *= gain
      return q
  
imports: import os
  import argparse
  import numpy
  import matplotlib
  import matplotlib.pyplot
  from sklearn.metrics import roc_curve, auc
  from tqdm import tqdm
  from skimage import measure, morphology
  from skimage.segmentation import mark_boundaries
  import paddle
label_desc: Use image node_id 7 for calling a global function with example usage: orthogonal(rows, cols, gain) and returns: q