code: def test_detect_low_cardinality_int():
      rng = np.random.RandomState(42)
      df_all = pd.DataFrame(
          {
              "binary_int": rng.randint(0, 2, size=1000),
              "categorical_int": rng.randint(0, 4, size=1000),
              "low_card_int_uniform": rng.randint(0, 20, size=1000),
              "low_card_int_binomial": rng.binomial(20, 0.3, size=1000),
              "cont_int": np.repeat(np.arange(500), 2),
          }
      )
  
      res = detect_types(df_all)
      types = res.T.idxmax()
  
      assert types["binary_int"] == "categorical"
      assert types["categorical_int"] == "categorical"
      assert types["low_card_int_uniform"] == "low_card_int_categorical"
      assert types["low_card_int_binomial"] == "low_card_int_ordinal"
      assert types["cont_int"] == "continuous"
  
imports: import os
  import pytest
  import random
  import string
  import warnings
  import numpy
  import pandas
  from sklearn.datasets import load_iris, load_digits
  from sklearn.model_selection import train_test_split
  from sklearn.pipeline import make_pipeline
  from sklearn.linear_model import LogisticRegression
  from dabl.preprocessing import USELESS_TYPES, detect_types, EasyPreprocessor, DirtyFloatCleaner, clean, _FLOAT_REGEX, _float_matching, detect_type_series
  from dabl.utils import data_df_from_bunch
  from dabl.datasets import load_titanic
  from dabl import plot
label_desc: Use image node_id 12 for calling a global function with example usage: test_detect_low_cardinality_int() without return types