code: def dist_ma_interaction(
      h: torch.FloatTensor,
      r: torch.FloatTensor,
      t: torch.FloatTensor,
  ) -> torch.FloatTensor:
      r"""Evaluate the DistMA interaction function from [shi2019]_.
  
      .. math ::
          \langle h, r\rangle + \langle r, t\rangle + \langle h, t\rangle
  
      :param h: shape: (`*batch_dims`, dim)
          The head representations.
      :param r: shape: (`*batch_dims`, dim)
          The relation representations.
      :param t: shape: (`*batch_dims`, dim)
          The tail representations.
  
      :return: shape: batch_dims
          The scores.
      """
      return batched_dot(h, r) + batched_dot(r, t) + batched_dot(h, t)
  
imports: from __future__ import annotations
  import functools
  from typing import Optional, Tuple, Union
  import numpy
  import torch
  from torch import broadcast_tensors, nn
  from .compute_kernel import batched_dot
  from .sim import KG2E_SIMILARITIES
  from ..typing import GaussianDistribution
  from ..utils import clamp_norm, einsum, is_cudnn_error, make_ones_like, negative_norm, negative_norm_of_sum, project_entity, tensor_product, tensor_sum
label_desc: Use image node_id 6 for calling a global function with example usage: dist_ma_interaction(h, r, t) and returns: unknown