code: def encodes(self, o: PILMask):
      return o._tensor_cls(image2tensor(o)[0])
  
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 16 for calling a global function with example usage: encodes(o) and returns: o