code: def setup_memory_profiler():
      with tempfile.TemporaryDirectory() as tmpdir:
          memory_profiler = MemoryProfilingManager(tmpdir)
  
          @ray.remote
          class Actor:
              def getpid(self):
                  return os.getpid()
  
              def long_run(self):
                  print("Long-running task began.")
                  time.sleep(1000)
                  print("Long-running task completed.")
  
          actor = Actor.remote()
  
          yield actor, memory_profiler
  
file_path: ray/python/ray/dashboard/modules/reporter/tests/test_profile_manager.py
imports: import sys
  import pytest
  import os
  import tempfile
  import time
  from unittest.mock import patch
  import ray
  from ray.dashboard.tests.conftest import *
  from ray.dashboard.modules.reporter.profile_manager import MemoryProfilingManager
label_desc: Use image node_id 1 for calling a global function with example usage: setup_memory_profiler() and returns: os