code: def test_online_mean_and_variance_nan(samples, expected_mean):
      mean_and_variance = utils.OnlineMeanAndVariance()
      for sample in samples:
          mean_and_variance.update(sample)
  
      assert np.isclose(mean_and_variance.mean, expected_mean)
      assert math.isnan(mean_and_variance.variance)
  
imports: import gzip
  import math
  import os
  import re
  from tempfile import TemporaryDirectory
  import unittest
  import numpy
  import pytest
  import torch
  from sockeye import __version__
  from sockeye import constants
  from sockeye import utils
label_desc: Use image node_id 10 for calling a global function with example usage: test_online_mean_and_variance_nan(samples, expected_mean) without return types