class_docstr: KTUP is a knowledge-based recommendation model. It adopts the strategy of multi-task learning to jointly learn
  recommendation and KG-related tasks, with the goal of understanding the reasons that a user interacts with an item.
  This method utilizes an attention mechanism to combine all preferences into a single-vector representation.
code: def _masked_softmax(self, logits):
      probs = F.softmax(logits, dim=len(logits.shape) - 1)
      return probs
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from torch.autograd import Variable
  from recbole.model.abstract_recommender import KnowledgeRecommender
  from recbole.model.init import xavier_uniform_initialization
  from recbole.model.loss import BPRLoss, EmbMarginLoss
  from recbole.utils import InputType
label_desc: Use image node_id 2 for calling the KTUP obj's underlying member method code with example usage: obj._masked_softmax(logits) and returns: probs