code: def _mean(self, values: np.ndarray, n_elems: int):
      blocks = (len(values) + n_elems - 1) // n_elems
      if len(values) % n_elems != 0:
          n_elems = len(values) // blocks
      means = []
      if blocks > 0:
          means.append(
              np.mean(
                  values[: blocks * n_elems].reshape(n_elems, blocks),
                  axis=-1,
              )
          )
  
      if len(values) > blocks * n_elems:
          means.append(
              np.mean(
                  values[blocks * n_elems :].reshape(1, -1), axis=-1
              )
          )
  
      return np.concatenate(means)
  
file_path: labml/client/labml/internal/tracker/writers/app.py
imports: import threading
  import time
  from typing import Dict
  import numpy
  from .None import Writer
  from ..indicators import Indicator
  from ..indicators.numeric import NumericIndicator
  from ...app import AppTracker, Packet, AppTrackDataSource
label_desc: Use image node_id 8 for calling the Writer obj's underlying member method code with example usage: obj._mean(values, n_elems) and returns: np