code: def test__fix_counts():
      df = pd.DataFrame(
          {
              "a": [1.0, np.NaN],
              "b": [1.0, np.NaN],
              "c": [1, np.NaN],
              "d": [1, 2],
          }
      )
      expected_out = {
          "a": {0: 1, 1: ""},
          "b": {0: 1.0, 1: "--NA--"},
          "c": {0: 1, 1: ""},
          "d": {0: 1, 1: 2},
      }
      assert (
          DatasetStatistics._fix_counts(df, cols=["a", "c", "d"])
          .fillna("--NA--")
          .to_dict()
          == expected_out
      )
  
imports: import os
  from unittest.mock import ANY, MagicMock
  import numpy
  import pandas
  import pytest
  from numpy import dtype
  from autogluon.eda import AnalysisState
  from autogluon.eda.analysis import MissingValuesAnalysis, RawTypesAnalysis, SpecialTypesAnalysis, VariableTypeAnalysis
  from autogluon.eda.analysis.dataset import DatasetSummary
  from autogluon.eda.auto import analyze
  from autogluon.eda.visualization import DatasetStatistics, DatasetTypeMismatch, LabelInsightsVisualization
label_desc: Use image node_id 6 for calling a global function with example usage: test__fix_counts() without return types