code: def test_multi_label_dot_product_loss__compute_loss_with_and_without_mask(
      sim_pos: np.ndarray,
      sim_candidates_il: np.ndarray,
      pos_neg_labels: np.ndarray,
      mask: Optional[np.ndarray],
      expected_loss: float,
  ):
      layer = MultiLabelDotProductLoss(num_candidates=3)
  
      loss = layer._loss_sigmoid(
          np.expand_dims(sim_pos, 1).astype(np.float32),
          np.expand_dims(sim_candidates_il, 1).astype(np.float32),
          pos_neg_labels.astype(np.float32),
          mask,
      ).numpy()
  
      assert np.isclose([loss], [expected_loss])
  
imports: from typing import Text, List, Tuple, Union, Optional
  import pytest
  from _pytest.monkeypatch import MonkeyPatch
  import numpy
  import tensorflow
  from rasa.utils.tensorflow.layers import DotProductLoss, MultiLabelDotProductLoss, RandomlyConnectedDense, DenseForSparse
  from rasa.utils.tensorflow.constants import INNER, SOFTMAX, LABEL, LABEL_PAD_ID
  import rasa.utils.tensorflow.layers_utils
  from rasa.shared.nlu.constants import TEXT, INTENT, ACTION_NAME, ACTION_TEXT, FEATURE_TYPE_SENTENCE, FEATURE_TYPE_SEQUENCE
  from rasa.core.constants import DIALOGUE
label_desc: Use image node_id 4 for calling a global function with example usage: test_multi_label_dot_product_loss__compute_loss_with_and_without_mask(sim_pos, sim_candidates_il, pos_neg_labels, mask, expected_loss) without return types