code: def test_stats_options_with_generators_to_json(self):
      generators = [
          lift_stats_generator.LiftStatsGenerator(
              schema=None,
              y_path=types.FeaturePath(["label"]),
              x_paths=[types.FeaturePath(["feature"])],
          )
      ]
      options = stats_options.StatsOptions(generators=generators)
      with self.assertRaisesRegex(
          ValueError, "StatsOptions cannot be converted"
      ):
          options.to_json()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  from typing import Optional
  import unittest
  from absl.testing import absltest
  from absl.testing import parameterized
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics import stats_options
  from tensorflow_data_validation.statistics.generators import lift_stats_generator
  from tensorflow_data_validation.utils import slicing_util
  from tfx_bsl.public.proto import slicing_spec_pb2
  from google.protobuf import text_format
  from tensorflow.python.util.protobuf import compare
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 4 for calling the StatsOptionsTest obj's underlying member method code with example usage: obj.test_stats_options_with_generators_to_json() without return types