code: def image2tensor(img):
      "Transform image to byte tensor in `c*h*w` dim order."
      res = tensor(img)
      if res.dim() == 2:
          res = res.unsqueeze(-1)
      return res.permute(2, 0, 1)
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from ..data.all import *
  from PIL import Image
  from matplotlib import patches, patheffects
label_desc: Use image node_id 11 for calling a global function with example usage: image2tensor(img) and returns: res