code: def test_drop_na():
      # dataframe cases
      df_raw = pd.DataFrame(
          np.nan, index=range(0, 20), columns=list("ABCDEFGHIJ")
      )
      for _ in range(30):
          df_raw.iloc[
              random.randint(0, 19), random.randint(0, 9)
          ] = random.randint(0, 99)
      for rowid in range(random.randint(1, 5)):
          row = random.randint(0, 19)
          for idx in range(0, 10):
              df_raw.iloc[row, idx] = random.randint(0, 99)
  
      # not supporting drop with axis=1
      with pytest.raises(NotImplementedError):
          md.DataFrame(df_raw).dropna(axis=1)
  
      if _drop_na_enable_no_default:
          with pytest.raises(TypeError):
              md.DataFrame(df_raw).dropna(how="any", thresh=0)
  
      # only one chunk in columns, can run dropna directly
      r = tile(md.DataFrame(df_raw, chunk_size=(4, 10)).dropna())
      assert r.shape == (np.nan, 10)
      assert r.nsplits == ((np.nan,) * 5, (10,))
      for c in r.chunks:
          assert isinstance(c.op, type(r.op))
          assert len(c.inputs) == 1
          assert len(c.inputs[0].inputs) == 0
          assert c.shape == (np.nan, 10)
  
      # multiple chunks in columns, count() will be called first
      r = tile(md.DataFrame(df_raw, chunk_size=4).dropna())
      assert r.shape == (np.nan, 10)
      assert r.nsplits == ((np.nan,) * 5, (4, 4, 2))
      for c in r.chunks:
          assert isinstance(c.op, type(r.op))
          assert len(c.inputs) == 2
          assert len(c.inputs[0].inputs) == 0
          assert c.inputs[1].op.stage == OperandStage.agg
          assert np.isnan(c.shape[0])
  
      # series cases
      series_raw = pd.Series(np.nan, index=range(20))
      for _ in range(10):
          series_raw.iloc[random.randint(0, 19)] = random.randint(0, 99)
  
      r = tile(md.Series(series_raw, chunk_size=4).dropna())
      assert r.shape == (np.nan,)
      assert r.nsplits == ((np.nan,) * 5,)
      for c in r.chunks:
          assert isinstance(c.op, type(r.op))
          assert len(c.inputs) == 1
          assert len(c.inputs[0].inputs) == 0
          assert c.shape == (np.nan,)
  
file_path: mars/mars/dataframe/missing/tests/test_missing.py
imports: import random
  import numpy
  import pandas
  import pytest
  from ....None import dataframe
  from ....None import tensor
  from ....core import tile
  from ....core.operand import OperandStage
  from ....utils import pd_release_version
  from ...core import MultiIndex
label_desc: Use image node_id 2 for calling a global function with example usage: test_drop_na() without return types