code: def predict_h_uncertain(
      model: Model,
      rt_batch: torch.LongTensor,
      num_samples: int = 5,
      slice_size: Optional[int] = None,
      *,
      mode: Optional[InductiveMode] = None,
  ) -> UncertainPrediction:
      """Forward pass using left side (head) prediction for obtaining scores of all possible heads.
  
      This method calculates the score for all possible heads for each (relation, tail)
      pair, as well as an uncertainty quantification.
  
      .. note::
  
          If the model has been trained with inverse relations, the task of predicting
          the head entities becomes the task of predicting the tail entities of the
          inverse triples, i.e., $f(*,r,t)$ is predicted by means of $f(t,r_{inv},*)$.
  
      :param model:
          the model used for predicting scores
      :param rt_batch: shape: (batch_size, 2)
          The indices of (relation, tail) pairs.
      :param slice_size: >0
          The divisor for the scoring function when using slicing.
      :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: (batch_size, num_entities)
          For each r-t pair, the scores for all possible heads.
  
          This function delegates to :func:`predict_uncertain_helper` by using
          :func:`pykeen.models.Model.score_h` (or :func:`pykeen.models.Model.score_h_inverse`
          if the model uses inverse triples) as the ``score_method``.
  
      .. warning::
          This function sets the model to evaluation mode and all dropout layers
          to training mode.
      """
      return predict_uncertain_helper(
          model=model,
          batch=rt_batch,
          score_method=model.score_h_inverse
          if model.use_inverse_triples
          else model.score_h,
          num_samples=num_samples,
          slice_size=slice_size,
          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 3 for calling a global function with example usage: predict_h_uncertain(model, rt_batch, num_samples, slice_size) and returns: predict_uncertain_helper