docstr: %%px --group-outputs=engine
code: def test_cellpx_groupby_engine(self):
      """%%px --group-outputs=engine"""
      ip = get_ipython()
      v = self.client[:]
      v.block = True
      v.activate()
  
      v["generate_output"] = generate_output
  
      with capture_output(display=False) as io:
          ip.run_cell_magic(
              "px",
              "--group-outputs=engine --no-stream",
              "generate_output()",
          )
  
      assert "\n\n" not in io.stdout
      lines = io.stdout.splitlines()
      expected = [
          r"\[stdout:\d+\]",
          "stdout",
          "stdout2",
          r"\[output:\d+\]",
          r"IPython\.core\.display\.HTML",
          r"IPython\.core\.display\.Math",
          r"Out\[\d+:\d+\]:.*IPython\.core\.display\.Math",
      ] * len(v)
  
      assert len(lines), len(expected) == io.stdout
      for line, expect in zip(lines, expected):
          if isinstance(expect, str):
              expect = [expect]
          for ex in expect:
              assert (
                  re.search(ex, line) is not None
              ), f"Expected {ex!r} in {line!r}"
  
      self._check_generated_stderr(io.stderr, len(v))
  
imports: import re
  import signal
  import sys
  import time
  import pytest
  from IPython import get_ipython
  from IPython.utils.io import capture_output
  import ipyparallel
  from ipyparallel import AsyncResult
  from .clienttest import ClusterTestCase, generate_output, raises_remote
label_desc: Use image node_id 7 for calling the TestParallelMagics obj's underlying member method code with example usage: obj.test_cellpx_groupby_engine() without return types