code: def to_uint16(x: Tensor | DcmDataset, bins=None):
      "Convert into a unit16 array"
      d = x.hist_scaled(bins).clamp(0, 1) * 2**16
      return d.numpy().astype(np.uint16)
  
imports: from __future__ import annotations
  from ..basics import *
  from ..vision.all import *
  from ..data.transforms import *
  import pydicom, kornia, skimage
  from pydicom.dataset import Dataset
  from pydicom.tag import BaseTag
  from pydicom.multival import MultiValue
  from PIL import Image
label_desc: Use image node_id 29 for calling a global function with example usage: to_uint16(x, bins) and returns: d