code: def test_sample(means, covs):
      torch.manual_seed(0)
  
      X = Normal(means, covs, covariance_type="diag").sample(1)
      assert_array_almost_equal(X, [[1.662299, 0.89037, -0.514547]])
  
      X = Normal(means, covs, covariance_type="diag").sample(5)
      assert_array_almost_equal(
          X,
          [
              [1.3705, -1.5620, 0.4217],
              [1.3210, 4.3979, 1.2369],
              [1.0790, -0.0496, 2.3184],
              [0.9430, 5.2119, 0.8146],
              [1.2368, 0.0444, 2.5477],
          ],
          3,
      )
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.distributions import Normal
  from ._utils import _test_initialization_raises_two_parameters
  from ._utils import _test_initialization
  from ._utils import _test_predictions
  from ._utils import _test_efd_from_summaries
  from ._utils import _test_raises
  from nose.tools import assert_raises
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 12 for calling a global function with example usage: test_sample(means, covs) without return types