code: def test_categorical_dimension_by_string__and_cardinality_type_matcher() -> (
      None
  ):  # noqa: D
      """Tests the composite of string type and cardinality below supplied threshold.
  
      Since the helper cardinality ratio is always either 1 or 0.9, the cardinality thresholds are set to either above
      0.9 (for checks which should match) or below 0.9 (for checks which should not match, or where the match does
      not matter)
      """
      assert defaults.CategoricalDimensionByStringTypeAndLowCardinalityRule(
          0.99
      ).match_column(
          get_column_properties(
              "db.schema.table.low_cardinality_string_col",
              InferenceColumnType.STRING,
              unique=False,
          )
      )
      # INTEGER type columns never match this rule
      assert not defaults.CategoricalDimensionByStringTypeAndLowCardinalityRule(
          0.99
      ).match_column(
          get_column_properties(
              "db.schema.table.int_col",
              InferenceColumnType.INTEGER,
              unique=False,
          )
      )
      assert not defaults.CategoricalDimensionByCardinalityRatioRule(
          0.40
      ).match_column(
          get_column_properties(
              "db.schema.table.high_cardinality_string_col",
              InferenceColumnType.STRING,
              unique=False,
          )
      )
  
file_path: metricflow/metricflow/test/inference/rule/test_defaults.py
imports: from __future__ import annotations
  import metricflow.inference.rule.defaults
  from metricflow.dataflow.sql_column import SqlColumn
  from metricflow.dataflow.sql_table import SqlTable
  from metricflow.inference.context.data_warehouse import ColumnProperties, DataWarehouseInferenceContext, InferenceColumnType, TableProperties
  from metricflow.inference.models import InferenceSignalType
label_desc: Use image node_id 10 for calling a global function with example usage: test_categorical_dimension_by_string__and_cardinality_type_matcher() without return types