code: def _get_cell_mask(normalized_adata, gene_set):
      """
      Calculates the score per cell for a list of genes, then returns a mask for
      the cells with the highest 50 scores.
      """
      score = _get_score(normalized_adata, gene_set)
      cell_idx = score.argsort()[-50:]
      mask = np.zeros(normalized_adata.n_obs)
      mask[cell_idx] = 1
      return mask.astype(bool)
  
file_path: pyro/pyro/contrib/examples/scanvi_data.py
imports: import math
  import numpy
  import torch
  import torch.nn
  from scipy import sparse
label_desc: Use image node_id 2 for calling a global function with example usage: _get_cell_mask(normalized_adata, gene_set) and returns: mask