code: def test_error_on_infinite(self):
      err_msg = (
          "Cannot make an Interval directly with non-finite bounds"
      )
      with self.assertRaisesRegex(ValueError, err_msg):
          gpytorch.constraints.Interval(0.0, math.inf)
      with self.assertRaisesRegex(ValueError, err_msg):
          gpytorch.constraints.Interval(-math.inf, 0.0)
  
imports: import math
  import unittest
  import torch
  from torch import sigmoid
  from torch.nn.functional import softplus
  import gpytorch
  from gpytorch.test.base_test_case import BaseTestCase
label_desc: Use image node_id 6 for calling the TestInterval obj's underlying member method code with example usage: obj.test_error_on_infinite() without return types