code: def test_has_same_base_dtype():
      arr_int32 = np.array([1, 2, 3], dtype=np.int32)
      arr_int64 = np.array([1, 2, 3], dtype=np.int64)
      arr_float32 = np.array([1, 2, 3], dtype=np.float32)
      arr_float64 = np.array([1, 2, 3], dtype=np.float64)
      arr_str = ["a", "b", "c"]
  
      df_1 = pd.DataFrame(dict(a=arr_int32, b=arr_int64))
      df_2 = pd.DataFrame(dict(a=arr_int64, b=arr_int32))
      df_3 = pd.DataFrame(dict(a=arr_float32, b=arr_int32))
      df_4 = pd.DataFrame(dict(a=arr_float64, b=arr_float64))
      df_5 = pd.DataFrame(
          dict(a=arr_float64, b=arr_float64, c=arr_float64)
      )
      df_6 = pd.DataFrame(dict(a=arr_str))
  
      # all columns match
      assert has_same_base_dtype(df_1, df_2)
      # specific column matches
      assert has_same_base_dtype(df_3, df_4, columns=["a"])
      # some column types do not match
      assert not has_same_base_dtype(df_3, df_4)
      # column types do not match
      assert not has_same_base_dtype(df_1, df_3, columns=["a"])
      # all columns are not shared
      assert not has_same_base_dtype(df_4, df_5)
      # column types do not match
      assert not has_same_base_dtype(df_5, df_6, columns=["a"])
      # assert string columns match
      assert has_same_base_dtype(df_6, df_6)
  
file_path: recommenders/tests/unit/recommenders/datasets/test_pandas_df_utils.py
imports: import os
  import numpy
  import pandas
  import pytest
  from tempfile import TemporaryDirectory
  from recommenders.datasets.pandas_df_utils import filter_by, LibffmConverter, has_same_base_dtype, has_columns, lru_cache_df, negative_feedback_sampler
label_desc: Use image node_id 6 for calling a global function with example usage: test_has_same_base_dtype() without return types