code: def test_replace_dataframe_errors(es):
      df = es["customers"].copy()
      if ps and isinstance(df, ps.DataFrame):
          df["new"] = [1, 2, 3]
      else:
          df["new"] = pd.Series([1, 2, 3])
  
      error_text = "New dataframe is missing new cohort column"
      with pytest.raises(ValueError, match=error_text):
          es.replace_dataframe(
              dataframe_name="customers", df=df.drop(columns=["cohort"])
          )
  
      error_text = "New dataframe contains 16 columns, expecting 15"
      with pytest.raises(ValueError, match=error_text):
          es.replace_dataframe(dataframe_name="customers", df=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 34 for calling a global function with example usage: test_replace_dataframe_errors(es) without return types