code: def bytes_per_pixel(mode: str) -> int:
      """Return the number of padded bytes per pixel for a given PIL image mode.
  
      In RGB mode we assume 4 bytes per pixel, which is the case for most
      consumers.
      """
      if mode in ("1", "L", "P"):
          return 1
      if mode in ("LA", "PA", "La") or mode.startswith("I;16"):
          return 2
      return 4
  
imports: from __future__ import annotations
  import logging
  from math import floor, sqrt
  from PIL import Image
label_desc: Use image node_id 1 for calling a global function with example usage: bytes_per_pixel(mode) and returns: int, int, int