code: def summarize_scalars(
      self, events: List[any], points: Optional[int] = 100
  ):
      # Shrink to 100 histograms
      if points is None:
          interval = 1
      else:
          interval = max(1, len(events) // points)
  
      merged = []
      results = []
      for i, e in enumerate(events):
          if i > 0 and (i + 1) % interval == 0:
              results.append(self.summarize(merged))
              merged = []
          merged.append(e)
      if len(merged) > 0:
          results.append(self.summarize(merged))
  
      return np.array(results)
  
imports: from typing import List, Optional, NamedTuple
  import numpy
label_desc: Use image node_id 2 for calling the Analytics obj's underlying member method code with example usage: obj.summarize_scalars(events, points) and returns: np