code: def _test_predictions(x, y, y_hat, dtype):
      assert isinstance(y_hat, torch.Tensor)
      assert y_hat.dtype == dtype
      assert y_hat.shape == (len(x),)
      assert_array_almost_equal(y, y_hat)
  
file_path: pomegranate/tests/distributions/_utils.py
imports: import numpy
  import torch
  from nose.tools import assert_raises
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 4 for calling a global function with example usage: _test_predictions(x, y, y_hat, dtype) without return types