code: def masked_select(input, mask):
      """masked_select
  
      Slice the value from given Mask
  
      Args:
          input: Input tensor to be selected
  
          mask: A bool tensor for sliced.
  
      Return:
          Part of inputs where mask is True.
      """
      index = L.where(mask)
      return L.gather(input, index)
  
file_path: PGL/legacy/pgl/utils/paddle_helper.py
imports: import warnings
  import numpy
  import paddle
  from paddle.fluid import core
  import paddle.fluid
  import paddle.fluid.layer_helper
  import paddle.fluid.layers
  from pgl.utils.logger import log
label_desc: Use image node_id 7 for calling a global function with example usage: masked_select(input, mask) and returns: L