code: def _get_score(normalized_adata, gene_set):
      """
      Returns the score per cell given a dictionary of + and - genes
      """
      score = np.zeros(normalized_adata.n_obs)
      for gene in gene_set["positive"]:
          expression = np.array(normalized_adata[:, gene].X)
          score += expression.flatten()
      for gene in gene_set["negative"]:
          expression = np.array(normalized_adata[:, gene].X)
          score -= expression.flatten()
      return score
  
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 1 for calling a global function with example usage: _get_score(normalized_adata, gene_set) and returns: score