code: def test_rm_trials_in_evc(three_family_branch_with_trials):
      """Test that trials of parent experiment are not deleted"""
      assert len(setup_storage().fetch_experiments({})) == 3
      assert (
          len(
              setup_storage()._fetch_trials(
                  {"experiment": hsh("test_double_exp", 1)}
              )
          )
          > 0
      )
      assert (
          len(
              setup_storage()._fetch_trials(
                  {"experiment": hsh("test_double_exp_child", 1)}
              )
          )
          > 0
      )
      assert (
          len(
              setup_storage()._fetch_trials(
                  {"experiment": hsh("test_double_exp_grand_child", 1)}
              )
          )
          > 0
      )
      execute("db rm -f test_double_exp_child --status *")
      # Make sure no experiments were deleted
      assert len(setup_storage().fetch_experiments({})) == 3
      # Make sure only trials of given experiment were deleted
      assert (
          len(
              setup_storage()._fetch_trials(
                  {"experiment": hsh("test_double_exp", 1)}
              )
          )
          > 0
      )
      assert (
          len(
              setup_storage()._fetch_trials(
                  {"experiment": hsh("test_double_exp_child", 1)}
              )
          )
          == 0
      )
      assert (
          len(
              setup_storage()._fetch_trials(
                  {"experiment": hsh("test_double_exp_grand_child", 1)}
              )
          )
          == 0
      )
  
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 11 for calling a global function with example usage: test_rm_trials_in_evc(three_family_branch_with_trials) without return types