class_docstr: Test all storage backend
class_docstr_tok: ["Test","all","storage","backend"]
docstr: Test count broken trials
code: def test_count_broken_trials(self, storage):
      """Test count broken trials"""
      with OrionState(
          experiments=[base_experiment],
          trials=generate_trials(),
          storage=storage,
      ) as cfg:
          count = 0
          for trial in cfg.trials:
              if trial["status"] == "broken":
                  count += 1
  
          storage = cfg.storage
  
          experiment = cfg.get_experiment("default_name", version=None)
  
          trials = storage.count_broken_trials(experiment)
  
          assert trials == count
  
imports: import copy
  import datetime
  import logging
  import os
  import pickle
  import time
  import pytest
  import orion.core
  from orion.core.io.database import DuplicateKeyError
  from orion.core.io.database.pickleddb import PickledDB
  from orion.core.worker.trial import Trial
  from orion.storage.base import FailedUpdate, LockAcquisitionTimeout, LockedAlgorithmState, MissingArguments, setup_storage
  from orion.storage.legacy import Legacy
  from orion.storage.track import HAS_TRACK, REASON
  from orion.testing import OrionState, base_experiment
label_desc: Use image node_id 26 for calling the TestStorage obj's underlying member method code with example usage: obj.test_count_broken_trials(storage) without return types