code: def test_where_execution(setup):
      dates = pd.date_range("1/1/2000", periods=20)
  
      raw_df = pd.DataFrame(
          np.random.randn(20, 10),
          index=dates,
          columns=list("ABCDEFGHIJ"),
      )
      raw_df2 = pd.DataFrame(
          np.random.randn(20, 10),
          index=dates,
          columns=list("ABCDEFGHIJ"),
      )
      df = md.DataFrame(raw_df, chunk_size=6)
      df2 = md.DataFrame(raw_df2, chunk_size=7)
  
      raw_series = pd.Series(np.random.randn(20), index=dates)
      raw_series2 = pd.Series(np.random.randn(20), index=dates)
      raw_series3 = pd.Series(
          np.random.randn(10), index=list("ABCDEFGHIJ")
      )
      series = md.Series(raw_series, chunk_size=6)
      series2 = md.Series(raw_series2, chunk_size=7)
      series3 = md.Series(raw_series3, chunk_size=7)
  
      # tests for dataframes
      with pytest.raises(NotImplementedError):
          df.mask(df < 0, md.DataFrame(np.random.randn(5, 5)))
      with pytest.raises(NotImplementedError):
          df.mask(series < 0, md.Series(np.random.randn(5)), axis=0)
  
      r = df.mask(df < 0)
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw_df.mask(raw_df < 0)
      )
      r = df.mask(raw_df < 0, df2)
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw_df.mask(raw_df < 0, raw_df2)
      )
  
      # tests for series
      with pytest.raises(NotImplementedError):
          series.mask(series < 0, md.Series(np.random.randn(5)))
  
      r = series.where(series < 0, 0)
      pd.testing.assert_series_equal(
          r.execute().fetch(), raw_series.where(raw_series < 0, 0)
      )
      r = series.where(series < 0, series2)
      pd.testing.assert_series_equal(
          r.execute().fetch(),
          raw_series.where(raw_series < 0, raw_series2),
      )
  
      # test for dataframe with series
      with pytest.raises(ValueError):
          df.mask(df < 0, series)
  
      r = df.mask(df < 0, series, axis=0)
      pd.testing.assert_frame_equal(
          r.execute().fetch(),
          raw_df.mask(raw_df < 0, raw_series, axis=0),
      )
      r = df.mask(series < 0, df2)
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw_df.mask(raw_series < 0, raw_df2)
      )
      r = df.mask(series < 0, series3, axis=1)
      pd.testing.assert_frame_equal(
          r.execute().fetch(),
          raw_df.mask(raw_series < 0, raw_series3, axis=1),
      )
  
      # test inplace
      new_df = df.copy()
      new_df.mask(new_df < 0, inplace=True)
      pd.testing.assert_frame_equal(
          new_df.execute().fetch(), raw_df.mask(raw_df < 0)
      )
  
imports: import os
  import tempfile
  import mars
  import numpy
  import pandas
  import pytest
  from ....None import dataframe
  from ....None import tensor
  from ....utils import pd_release_version
  from ...datasource.read_csv import DataFrameReadCSV
  from ...datasource.read_sql import DataFrameReadSQL
  from ...datasource.read_parquet import DataFrameReadParquet
label_desc: Use image node_id 24 for calling a global function with example usage: test_where_execution(setup) without return types