code: def _convert_scores(
      scores: Sequence[Union[int, bool]]
  ) -> List[float]:
      """Convert boolean scores to int."""
      # `scores` is returned by `code_metrics_helper.run_test` and is a list of bools/ints.
      return [
          1.0 if isinstance(score, bool) and score else 0.0
          for score in scores
      ]
  
imports: import threading
  import multiprocessing
  from typing import List, Union, Sequence, cast
  from helm.common.hierarchical_logger import hlog
  from helm.common.request import RequestResult
  from helm.benchmark.adaptation.scenario_state import ScenarioState
  from helm.benchmark.adaptation.request_state import RequestState
  from helm.benchmark.adaptation.adapter_spec import AdapterSpec
  from helm.benchmark.scenarios.code_scenario import CodeReference
  from .None import code_metrics_helper
  from .metric import Metric, MetricResult
  from .metric_service import MetricService
  from .metric_name import MetricName
  from .statistic import Stat
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_scores(scores) and returns: unknown