code: def sparsity_rows(tensor, transposed=True):
      """Row-wise sparsity for 2D matrices
  
      PyTorch GEMM matrices are transposed before they are used in the GEMM operation.
      In other words the matrices are stored in memory transposed.  So by default we compute
      the sparsity of the transposed dimension.
      """
      if transposed:
          return sparsity_matrix(tensor, 1)
      return sparsity_matrix(tensor, 0)
  
imports: import argparse
  from collections import OrderedDict
  from copy import deepcopy
  import logging
  import operator
  import random
  import numpy
  import torch
  import torch.nn
  import torch.backends.cudnn
  import yaml
  import inspect
label_desc: Use image node_id 25 for calling a global function with example usage: sparsity_rows(tensor, transposed) and returns: sparsity_matrix, sparsity_matrix