def register_buffer_list(
        self,
        name: str,
        values: list[torch.Tensor],
        persistent: bool = True,
        **kwargs,
    ) -> None:
        """Register a list of tensors as buffers in a PyTorch module.

        Each tensor is registered as a buffer with the name ``_name_i`` where ``i``
        is the index of the tensor in the list. The list can be accessed and
        updated using the original ``name``.

        Args:
            name (str):
                Name of the buffer list.
            values (list[torch.Tensor]):
                List of tensors to register as buffers.
            persistent (bool, optional):
                Whether the buffers should be saved as part of the module
                state_dict. Defaults to ``True``.
            **kwargs:
                Additional keyword arguments to pass to
                ``torch.nn.Module.register_buffer``.
        """
        for i, value in enumerate(values):
            self.register_buffer(f"_{name}_{i}", value, persistent=persistent, **kwargs)

        setattr(BufferListMixin, name, BufferListDescriptor(name, len(values)))
Register a list of tensors as buffers in a PyTorch module.

        Each tensor is registered as a buffer with the name ``_name_i`` where ``i``
        is the index of the tensor in the list. The list can be accessed and
        updated using the original ``name``.

        Args:
            name (str):
                Name of the buffer list.
            values (list[torch.Tensor]):
                List of tensors to register as buffers.
            persistent (bool, optional):
                Whether the buffers should be saved as part of the module
                state_dict. Defaults to ``True``.
            **kwargs:
                Additional keyword arguments to pass to
                ``torch.nn.Module.register_buffer``.
        
src/anomalib/models/components/base/buffer_list.py