code: def test_rm_trials_by_status(single_with_trials):
      """Test that trials can be deleted by status"""
      trials = setup_storage()._fetch_trials({})
      n_broken = sum(trial.status == "broken" for trial in trials)
      assert n_broken > 0
      execute("db rm -f test_single_exp --status broken")
      assert (
          len(setup_storage()._fetch_trials({}))
          == len(trials) - n_broken
      )
  
file_path: orion/tests/functional/commands/test_db_rm.py
imports: import zlib
  import pytest
  import orion.core.cli
  from orion.storage.base import setup_storage
label_desc: Use image node_id 9 for calling a global function with example usage: test_rm_trials_by_status(single_with_trials) without return types