code: def test_negative_sampler(self):
      self.assertProtoEquals(
          """
        unique: true
        sampler: UNIFORM
      """,
          cs_config_builder.negative_sampler(
              True, cs_config_pb2.NegativeSamplerConfig.UNIFORM
          ),
      )
      self.assertProtoEquals(
          """
        unique: false
        sampler: UNIFORM
      """,
          cs_config_builder.negative_sampler(
              False, cs_config_pb2.NegativeSamplerConfig.UNIFORM
          ),
      )
      self.assertProtoEquals(
          """
        unique: true
        sampler: LOG_UNIFORM
      """,
          cs_config_builder.negative_sampler(
              True, cs_config_pb2.NegativeSamplerConfig.LOG_UNIFORM
          ),
      )
      self.assertProtoEquals(
          """
        unique: false
        sampler: LOG_UNIFORM
      """,
          cs_config_builder.negative_sampler(
              False, cs_config_pb2.NegativeSamplerConfig.LOG_UNIFORM
          ),
      )
      self.assertProtoEquals(
          """
        unique: false
        sampler: UNIFORM
      """,
          cs_config_builder.negative_sampler(False, "UNIFORM"),
      )
      self.assertProtoEquals(
          """
        unique: true
        sampler: LOG_UNIFORM
      """,
          cs_config_builder.negative_sampler(True, "LOG_UNIFORM"),
      )
  
file_path: neural-structured-learning/research/carls/candidate_sampling/candidate_sampler_config_builder_test.py
imports: from research.carls.candidate_sampling import candidate_sampler_config_builder
  from research.carls.candidate_sampling import candidate_sampler_config_pb2
  import tensorflow
label_desc: Use image node_id 1 for calling the CandidateSamplerConfigBuilderTest obj's underlying member method code with example usage: obj.test_negative_sampler() without return types