code: def _xrandr_calc(x_px, y_px, x_mm, y_mm):
      if x_mm == 0 or y_mm == 0:
          logger.warning(
              "'xrandr' output has screen dimension of 0mm, "
              + "can't compute proper DPI"
          )
          return 96.0
      return 25.4 * (x_px / x_mm + y_px / y_mm) / 2
  
file_path: vispy/vispy/util/dpi/_linux.py
imports: import os
  import re
  from subprocess import CalledProcessError
  from ..logs import logger
  from ..wrappers import run_subprocess
label_desc: Use image node_id 2 for calling a global function with example usage: _xrandr_calc(x_px, y_px, x_mm, y_mm) and returns: unknown, int