code: def get_length(mask):
      length = torch.sum(mask, 1)
      length = length.long().cpu()
      return length
  
file_path: nni/examples/nas/legacy/textnas/utils.py
imports: import logging
  import torch
  import torch.nn
label_desc: Use image node_id 1 for calling a global function with example usage: get_length(mask) and returns: length