code: def test_auto_type_inference_single_value_binary_feature():
      field = FieldInfo(
          name="foo",
          dtype="object",
          num_distinct_values=1,
          distinct_values=["1" for i in range(ROW_COUNT)],
      )
      assert (
          infer_type(
              field=field, missing_value_percent=0, row_count=ROW_COUNT
          )
          == CATEGORY
      )
      assert should_exclude(
          idx=3,
          field=field,
          dtype="object",
          column_count=10,
          row_count=ROW_COUNT,
          targets={TARGET_NAME},
      )
  
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 4 for calling a global function with example usage: test_auto_type_inference_single_value_binary_feature() without return types