code: def test_nan_values(self) -> None:
      Y = torch.rand(10, 2)
      Y[8:, 1] = float("nan")
      ref_pt = torch.rand(2)
      # On init.
      with self.assertRaisesRegex(ValueError, "with 2 NaN values"):
          DummyBoxDecomposition(ref_point=ref_pt, sort=True, Y=Y)
      # On update.
      bd = DummyBoxDecomposition(ref_point=ref_pt, sort=True)
      with self.assertRaisesRegex(ValueError, "with 2 NaN values"):
          bd.update(Y=Y)
  
imports: from __future__ import annotations
  from itertools import product
  from unittest import mock
  import torch
  from botorch.exceptions.errors import BotorchError
  from botorch.utils.multi_objective.box_decompositions.box_decomposition import BoxDecomposition, FastPartitioning
  from botorch.utils.multi_objective.box_decompositions.dominated import DominatedPartitioning
  from botorch.utils.multi_objective.box_decompositions.non_dominated import FastNondominatedPartitioning, NondominatedPartitioning
  from botorch.utils.multi_objective.box_decompositions.utils import update_local_upper_bounds_incremental
  from botorch.utils.testing import BotorchTestCase
label_desc: Use image node_id 4 for calling the TestBoxDecomposition obj's underlying member method code with example usage: obj.test_nan_values() without return types