code: def _generate_rowwise_mask(self, embedding_rows):
      indicator = torch.from_numpy(
          (np.random.random_sample(embedding_rows)).astype(np.float32)
      )
      threshold = float(np.random.random_sample())
      mask = torch.BoolTensor(
          [True if val >= threshold else False for val in indicator]
      )
      return mask
  
file_path: pytorch/test/test_pruning_op.py
imports: import hypothesis.strategies
  from hypothesis import given
  import numpy
  import torch
  from torch.testing._internal.common_utils import TestCase, run_tests, skipIfTorchDynamo
  import torch.testing._internal.hypothesis_utils
label_desc: Use image node_id 1 for calling the PruningOpTest obj's underlying member method code with example usage: obj._generate_rowwise_mask(embedding_rows) and returns: mask