code: def test_persist(setup_cluster):
      import dask
  
      def inc(x):
          return x + 1
  
      a = dask.delayed(inc)(1)
      task_mars_persist = dask.delayed(inc)(
          a.persist(scheduler=mars_scheduler)
      )
      task_dask_persist = dask.delayed(inc)(a.persist())
  
      assert task_dask_persist.compute() == task_mars_persist.compute(
          scheduler=mars_scheduler
      )
  
file_path: mars/mars/contrib/dask/tests/test_dask.py
imports: import pytest
  from ....utils import lazy_import
  from ..None import convert_dask_collection, mars_scheduler
label_desc: Use image node_id 8 for calling a global function with example usage: test_persist(setup_cluster) and returns: unknown