class_docstr: Control the loops for training, evaluation, and prediction. This module is independent of
  the model definition. This class inherits from the Pytorch Lightning's LightningModule:
  https://lightning.ai/docs/pytorch/stable/common/lightning_module.html
class_docstr_tok: ["Control","the","loops","for","training",",","evaluation",",","and","prediction",".","This","module","is","independent","of","the","model","definition",".","This","class","inherits","from","the","Pytorch","Lightning","'s","LightningModule",":","https",":","\/\/lightning.ai\/docs\/pytorch\/stable\/common\/lightning_module.html"]
code: def _get_label(self, batch: Dict):
      label = None
      if self.response_model.label_key in batch:
          label = batch[self.response_model.label_key]
      return label
  
imports: import logging
  from typing import Callable, Dict, List, Optional, Union
  import lightning.pytorch
  import torch
  import torchmetrics
  from lightning.pytorch.utilities import grad_norm
  from omegaconf import DictConfig
  from torch import nn
  from torch.nn.modules.loss import _Loss
  from torchmetrics.aggregation import BaseAggregator
  from ..constants import FEATURES, LOGIT_SCALE, PROBABILITY, QUERY, RESPONSE
  from ..models.utils import run_model
  from ..utils.matcher import compute_matching_probability
  from .losses import MultiNegativesSoftmaxLoss
  from .utils import CustomHitRate, apply_layerwise_lr_decay, apply_single_lr, apply_two_stages_lr, generate_metric_learning_labels, get_lr_scheduler, get_optimizer
label_desc: Use image node_id 4 for calling the MatcherLitModule obj's underlying member method code with example usage: obj._get_label(batch) and returns: label