class_docstr: Abstract implementation of encrypted tensor type. Every subclass of `CrypTensor`
  must implement the methods defined here. The actual tensor data should live in
  an instance attribute called `_tensor`. When implemented, the `CrypTensor`
  provides a full autograd implementation to the user.
class_docstr_tok: ["Abstract","implementation","of","encrypted","tensor","type",".","Every","subclass","of","`","CrypTensor","`","must","implement","the","methods","defined","here",".","The","actual","tensor","data","should","live","in","an","instance","attribute","called","`","_tensor","`",".","When","implemented",",","the","`","CrypTensor","`","provides","a","full","autograd","implementation","to","the","user","."]
docstr: Perform an average pooling on each 2D matrix of the given tensor
  
  Args:
      kernel_size (int or tuple): pooling kernel size.
docstr_tok: ["Perform","an","average","pooling","on","each","2D","matrix","of","the","given","tensor","Args",":","kernel_size","(","int","or","tuple",")",":","pooling","kernel","size","."]
code: def avg_pool2d(self, kernel_size, stride=None, padding=0):
      """Perform an average pooling on each 2D matrix of the given tensor
  
      Args:
          kernel_size (int or tuple): pooling kernel size.
      """
      raise NotImplementedError("avg_pool2d is not implemented")
  
imports: from contextlib import contextmanager
  import torch
  from .debug import register_validation
  from .gradients import AutogradContext, BaseAutogradContext, get_grad_fn
  from .common import functions
label_desc: Use image node_id 54 for calling the CrypTensor obj's underlying member method code with example usage: obj.avg_pool2d(kernel_size, stride, padding) without return types