code: def predict_hrt_uncertain(
      model: Model,
      hrt_batch: torch.LongTensor,
      num_samples: int = 5,
      *,
      mode: Optional[InductiveMode] = None,
  ) -> UncertainPrediction:
      """
      Calculate the scores with uncertainty quantification via Monte-Carlo dropout.
  
      :param model:
          the model used for predicting scores
      :param hrt_batch: shape: (number of triples, 3)
          The indices of (head, relation, tail) triples.
      :param num_samples: >1
          the number of samples to draw
      :param mode:
          The pass mode, which is None in the transductive setting and one of "training",
          "validation", or "testing" in the inductive setting.
  
      :return: shape: (number of triples, 1)
          The score for each triple, and an uncertainty score, where larger scores
          correspond to less certain predictions.
  
          This function delegates to :func:`predict_uncertain_helper` by using
          :func:`pykeen.models.Model.score_hrt` as the ``score_method``.
  
      .. warning::
          This function sets the model to evaluation mode and all dropout layers
          to training mode.
  
      Example Usage::
  
          from pykeen.pipeline import pipeline
          from pykeen.models.uncertainty import predict_hrt_uncertain
  
          result = pipeline(dataset="nations", model="ERMLPE")
          prediction_with_uncertainty = predict_hrt_uncertain(
              model=result.model,
              hrt_batch=result.training.mapped_triples[0:8],
          )
      """
      return predict_uncertain_helper(
          model=model,
          batch=hrt_batch,
          score_method=model.score_hrt,
          num_samples=num_samples,
          mode=mode,
      )
  
file_path: pykeen/src/pykeen/models/uncertainty.py
imports: from typing import Callable, NamedTuple, Optional
  import torch
  from .base import Model
  from ..typing import InductiveMode
  from ..utils import get_dropout_modules
label_desc: Use image node_id 2 for calling a global function with example usage: predict_hrt_uncertain(model, hrt_batch, num_samples) and returns: predict_uncertain_helper