code: def test_replace_dataframe_different_dtypes(es):
      float_dtype_df = es["customers"].copy()
      float_dtype_df = float_dtype_df.astype({"age": "float64"})
  
      es.replace_dataframe(
          dataframe_name="customers", df=float_dtype_df
      )
  
      assert es["customers"]["age"].dtype == "int64"
      assert isinstance(
          es["customers"].ww.logical_types["age"], Integer
      )
  
      incompatible_dtype_df = es["customers"].copy()
      incompatible_list = ["hi", "bye", "bye"]
      if ps and isinstance(incompatible_dtype_df, ps.DataFrame):
          incompatible_dtype_df["age"] = incompatible_list
      else:
          incompatible_dtype_df["age"] = pd.Series(incompatible_list)
  
      if isinstance(es["customers"], pd.DataFrame):
          # Dask and Spark do not error on invalid type conversion until compute
          error_msg = "Error converting datatype for age from type object to type int64. Please confirm the underlying data is consistent with logical type Integer."
          with pytest.raises(TypeConversionError, match=error_msg):
              es.replace_dataframe(
                  dataframe_name="customers", df=incompatible_dtype_df
              )
  
imports: from datetime import datetime
  import numpy
  import pandas
  import pytest
  from woodwork.exceptions import TypeConversionError
  from woodwork.logical_types import Boolean, Categorical, Datetime, Double, Integer, NaturalLanguage
  from featuretools.entityset.entityset import LTI_COLUMN_NAME, EntitySet
  from featuretools.tests.testing_utils import to_pandas
  from featuretools.utils.gen_utils import Library, import_or_none, is_instance
label_desc: Use image node_id 38 for calling a global function with example usage: test_replace_dataframe_different_dtypes(es) without return types