class_docstr: A block applying global pooling with optional masking.
  Pooling is applied w.r.t. the selected pooling function, the pooling dimension and the optional mask (in_keys[1]).
  
  :param in_keys: One key identifying the input tensor, and an optional second one identifying the mask tensor.
  :param out_keys: One key identifying the output tensors.
  :param in_shapes: List of input shapes.
  :param pooling_func: Options: {'mean', 'sum', 'max'}.
  :param pooling_dim: The dimension(s) along which the pooling functions get applied.
class_docstr_tok: ["A","block","applying","global","pooling","with","optional","masking",".","Pooling","is","applied","w.r.t",".","the","selected","pooling","function",",","the","pooling","dimension","and","the","optional","mask","(","in_keys","[","1","]",")",".",":","param","in_keys",":","One","key","identifying","the","input","tensor",",","and","an","optional","second","one","identifying","the","mask","tensor",".",":","param","out_keys",":","One","key","identifying","the","output","tensors",".",":","param","in_shapes",":","List","of","input","shapes",".",":","param","pooling_func",":","Options",":","{","'mean","'",",","'sum","'",",","'max","'","}",".",":","param","pooling_dim",":","The","dimension","(","s",")","along","which","the","pooling","functions","get","applied","."]
code: def __repr__(self):
      txt = f"{self.__class__.__name__}"
      txt += f"\n\tPooling func: {self._pooling_func_name}"
      txt += f"\n\tOut Shapes: {self.out_shapes()}"
      return txt
  
file_path: maze/maze/perception/blocks/general/masked_global_pooling.py
imports: from typing import Union, List, Sequence, Dict
  import torch
  from maze.core.annotations import override
  from maze.perception.blocks.base import PerceptionBlock
label_desc: Use image node_id 6 for calling the MaskedGlobalPoolingBlock obj's underlying member method code with example usage: obj.__repr__() and returns: txt