class_docstr: Mask out values in a 1-dimensional buffer using a fixed masking pattern.
class_docstr_tok: ["Mask","out","values","in","a","1-dimensional","buffer","using","a","fixed","masking","pattern","."]
docstr: Mask values in a 1-dimensional buffer with a fixed masking pattern.
  
  Args:
      data: A dictionary containing a key called "samples", which contains
          a tensor of shape [N], where N is the number of bytes.
  
  Returns:
      The transformed data.
docstr_tok: ["Mask","values","in","a","1-dimensional","buffer","with","a","fixed","masking","pattern",".","Args",":","data",":","A","dictionary","containing","a","key","called","``","samples","''",",","which","contains","a","tensor","of","shape","[","N","]",",","where","N","is","the","number","of","bytes",".","Returns",":","The","transformed","data","."]
code: def __call__(
      self, data: Dict[str, Union[torch.Tensor, int]]
  ) -> Dict[str, Union[torch.Tensor, int]]:
      """
      Mask values in a 1-dimensional buffer with a fixed masking pattern.
  
      Args:
          data: A dictionary containing a key called "samples", which contains
              a tensor of shape [N], where N is the number of bytes.
  
      Returns:
          The transformed data.
      """
      x = data["samples"]
      mask = self._generate_masks(x.shape[0])
      x = x[mask]
      data["samples"] = x
      return data
  
imports: import argparse
  import io
  from typing import Dict, Union
  import numpy
  import torch
  from PIL import Image
  from data.transforms import TRANSFORMATIONS_REGISTRY, BaseTransformation
label_desc: Use image node_id 3 for calling the MaskPositions obj's underlying member method code with example usage: obj.__call__(data) and returns: data