code: def test_type_inference_with_negative_positive_binary_values(
      negative_class,
  ):
      """This test ensures that we infer binary type for a feature with negative and positive values, specifically -1
      and 1."""
      field = FieldInfo(
          name="foo",
          dtype="object",
          num_distinct_values=2,
          distinct_values=["1", negative_class],
      )
      assert (
          infer_type(
              field=field, missing_value_percent=0, row_count=ROW_COUNT
          )
          == BINARY
      )
  
file_path: ludwig/tests/ludwig/utils/automl/test_type_inference.py
imports: import random
  import pytest
  from ludwig.constants import AUDIO, BINARY, CATEGORY, DATE, IMAGE, NUMBER, TEXT
  from ludwig.data.dataset_synthesizer import generate_string
  from ludwig.utils.automl.field_info import FieldInfo
  from ludwig.utils.automl.type_inference import infer_type, should_exclude
label_desc: Use image node_id 6 for calling a global function with example usage: test_type_inference_with_negative_positive_binary_values(negative_class) without return types