code: def test_get_num_samples(dtype):
      # Numpy
      num_classes = 3
      targets_np = np.random.randint(0, num_classes, size=(2, 5))
  
      # PyTorch
      targets_th = torch.as_tensor(targets_np)
      num_samples_th = get_num_samples(
          targets_th, num_classes, dtype=dtype
      )
  
      num_samples_np = np.zeros((2, num_classes), dtype=np.int_)
      for i in range(2):
          for j in range(5):
              num_samples_np[i, targets_np[i, j]] += 1
  
      assert num_samples_th.shape == (2, num_classes)
      if dtype is not None:
          assert num_samples_th.dtype == dtype
      np.testing.assert_equal(num_samples_th.numpy(), num_samples_np)
  
imports: import pytest
  import numpy
  import torch
  from torchmeta.utils.prototype import get_num_samples, get_prototypes, prototypical_loss
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_num_samples(dtype) without return types