code: def orthogonal_matrix(num_rows: int, num_cols: int) -> Tensor:
      r"""Generate an orthogonal matrix with `num_rows` rows
      and `num_cols` columns.
      """
      num_full_blocks = int(num_rows / num_cols)
      blocks = []
      for _ in range(num_full_blocks):
          q = _orthogonal_matrix(num_cols)
          blocks.append(q)
      remain_rows = num_rows - num_full_blocks * num_cols
      if remain_rows > 0:
          q = _orthogonal_matrix(num_cols)
          blocks.append(q[:remain_rows])
      mat = torch.cat(blocks)
      # multiplier = torch.randn((num_rows, num_cols)).norm(dim=1)
      # scaler = torch.diag(multiplier)
      # mat = scaler @ mat
      return mat
  
file_path: pytorch_geometric/torch_geometric/nn/attention/performer.py
imports: import math
  from typing import Callable, Optional
  import torch
  from torch import Tensor
label_desc: Use image node_id 2 for calling a global function with example usage: orthogonal_matrix(num_rows, num_cols) and returns: mat