code: def test_sanitize_string_dtype():
      df = pd.DataFrame(
          {
              "string_object": ["a", "b", "c", "d"],
              "string_string": pd.array(
                  ["a", "b", "c", "d"], dtype="string"
              ),
              "string_object_null": ["a", "b", None, "d"],
              "string_string_null": pd.array(
                  ["a", "b", None, "d"], dtype="string"
              ),
          }
      )
  
      df_clean = sanitize_dataframe(df)
      assert {col.dtype.name for _, col in df_clean.items()} == {
          "object"
      }
  
      result_python = {
          col_name: list(col) for col_name, col in df_clean.items()
      }
      assert result_python == {
          "string_object": ["a", "b", "c", "d"],
          "string_string": ["a", "b", "c", "d"],
          "string_object_null": ["a", "b", None, "d"],
          "string_string_null": ["a", "b", None, "d"],
      }
  
file_path: altair/tests/utils/test_utils.py
imports: import io
  import json
  import warnings
  import numpy
  import pandas
  import pytest
  from altair.utils import infer_vegalite_type, sanitize_dataframe
label_desc: Use image node_id 8 for calling a global function with example usage: test_sanitize_string_dtype() without return types