code: def get_bucket_accuracy(
      bucket_values: List[List[float]],
      y_true: List[float],
      y_pred: List[float],
  ) -> List[float]:
      """
      Computes accuracy for each bucket. If a bucket does not have any predictions,
      uses -1 as a placeholder.
      """
  
      per_bucket_correct = [
          [int(y_true[i] == y_pred[i]) for i in bucket]
          for bucket in bucket_values
      ]
      return [
          np.mean(bucket) if len(bucket) > 0 else -1.0
          for bucket in per_bucket_correct
      ]
  
file_path: pytext/pytext/metrics/calibration_metrics.py
imports: import math
  from typing import Dict, List, NamedTuple, Tuple
  import numpy
  from pytext.metrics import LabelPrediction
label_desc: Use image node_id 3 for calling a global function with example usage: get_bucket_accuracy(bucket_values, y_true, y_pred) and returns: unknown