code: def test_matching_log_probas():
      num_classes = 11
      eps = 1e-8
      # Numpy
      embeddings_np = np.random.randn(2, 3, 7).astype(np.float32)
      test_embeddings_np = np.random.randn(2, 5, 7).astype(np.float32)
      targets_np = np.random.randint(num_classes, size=(2, 3))
  
      # PyTorch
      embeddings_th = torch.as_tensor(embeddings_np)
      test_embeddings_th = torch.as_tensor(test_embeddings_np)
      targets_th = torch.as_tensor(targets_np)
  
      log_probas_th = matching_log_probas(
          embeddings_th,
          targets_th,
          test_embeddings_th,
          num_classes,
          eps=eps,
      )
  
      assert log_probas_th.shape == (2, 11, 5)
      np.testing.assert_array_less(log_probas_th.numpy(), 0.0)
  
file_path: pytorch-meta/torchmeta/tests/utils/test_matching.py
imports: import pytest
  from flaky import flaky
  import numpy
  import torch
  from torchmeta.utils.matching import pairwise_cosine_similarity, matching_log_probas, matching_probas, matching_loss
label_desc: Use image node_id 3 for calling a global function with example usage: test_matching_log_probas() without return types