code: def build_pad_idx(input_mask):
      pad_idx = L.where(L.cast(L.squeeze(input_mask, [2]), "bool"))
      return pad_idx
  
file_path: PGL/legacy/examples/xformer/transformer_encoder_sparse.py
imports: from functools import partial
  import paddle.fluid
  import paddle.fluid.layers
  import paddle.fluid.layers
  from .sparse_scaled_dot_product_attention import sparse_scaled_dot_product_attention
label_desc: Use image node_id 5 for calling a global function with example usage: build_pad_idx(input_mask) and returns: pad_idx