class_docstr: A Matrices object wraps a Dict[float, Dict[MatrixEntryKey, float]].
  
  A specific confusion matrix entry can be accessed for a threshold,
  actual_class and predicted_class with
  
      instance[threshold][MatrixEntryKey(actual_class_id, predicted_class_id)]
class_docstr_tok: ["A","Matrices","object","wraps","a","Dict","[","float",",","Dict","[","MatrixEntryKey",",","float","]","]",".","A","specific","confusion","matrix","entry","can","be","accessed","for","a","threshold",",","actual_class","and","predicted_class","with","instance","[","threshold","]","[","MatrixEntryKey","(","actual_class_id",",","predicted_class_id",")","]"]
code: def _apply_binary_op_broadcast(
      self, other: float, op: Callable[[float, float], float]
  ) -> "Matrices":
      result = Matrices()
      for threshold, self_entries in self.items():
          result[threshold] = {}
          for entry_key, self_count in self_entries.items():
              result[threshold][entry_key] = op(self_count, other)
      return result
  
imports: from typing import Any, Callable, Dict, Iterable, Iterator, List, NamedTuple, Optional, Tuple
  import apache_beam
  import numpy
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.proto import metrics_for_slice_pb2
label_desc: Use image node_id 2 for calling the Matrices obj's underlying member method code with example usage: obj._apply_binary_op_broadcast(other, op) and returns: result