class_docstr: AnomalyModule to train, validate, predict and test images.
  
  Acts as a base class for all the Anomaly Modules in the library.
class_docstr_tok: ["AnomalyModule","to","train",",","validate",",","predict","and","test","images",".","Acts","as","a","base","class","for","all","the","Anomaly","Modules","in","the","library","."]
docstr: Calls validation_step for anomaly map/score calculation.
  
  Args:
    batch (dict[str, str | Tensor]): Input batch
    batch_idx (int): Batch index
  
  Returns:
    Dictionary containing images, features, true labels and masks.
    These are required in `validation_epoch_end` for feature concatenation.
docstr_tok: ["Calls","validation_step","for","anomaly","map\/score","calculation",".","Args",":","batch","(","dict","[","str",",","str","|","Tensor","]",")",":","Input","batch","batch_idx","(","int",")",":","Batch","index","Returns",":","Dictionary","containing","images",",","features",",","true","labels","and","masks",".","These","are","required","in","`","validation_epoch_end","`","for","feature","concatenation","."]
code: def test_step(
      self,
      batch: dict[str, str | Tensor],
      batch_idx: int,
      *args,
      **kwargs,
  ) -> STEP_OUTPUT:
      """Calls validation_step for anomaly map/score calculation.
  
      Args:
        batch (dict[str, str | Tensor]): Input batch
        batch_idx (int): Batch index
  
      Returns:
        Dictionary containing images, features, true labels and masks.
        These are required in `validation_epoch_end` for feature concatenation.
      """
      del args, kwargs  # These variables are not used.
  
      return self.predict_step(batch, batch_idx)
  
imports: from __future__ import annotations
  import importlib
  import logging
  from abc import ABC
  from typing import Any, OrderedDict
  from warnings import warn
  import pytorch_lightning
  import torch
  from pytorch_lightning.callbacks import Callback
  from pytorch_lightning.utilities.types import EPOCH_OUTPUT, STEP_OUTPUT
  from torch import Tensor, nn
  from torchmetrics import Metric
  from anomalib.data.utils import boxes_to_anomaly_maps, boxes_to_masks, masks_to_boxes
  from anomalib.post_processing import ThresholdMethod
  from anomalib.utils.metrics import AnomalibMetricCollection, AnomalyScoreDistribution, AnomalyScoreThreshold, MinMax
label_desc: Use image node_id 5 for calling the AnomalyModule obj's underlying member method code with example usage: obj.test_step(batch, batch_idx) and returns: self