code: def test_infer_single_column_two_classes():
      analyser = output_analysers.ClassificationAnalyser(name="a")
      dataset = tf.data.Dataset.from_tensor_slices(
          np.random.randint(0, 2, 10)
      ).batch(32)
  
      for data in dataset:
          analyser.update(data)
      analyser.finalize()
  
      assert analyser.num_classes == 2
  
file_path: autokeras/autokeras/analysers/output_analysers_test.py
imports: import numpy
  import pytest
  import tensorflow
  from autokeras import test_utils
  from autokeras.analysers import output_analysers
label_desc: Use image node_id 6 for calling a global function with example usage: test_infer_single_column_two_classes() without return types