code: def hist_scaled(self: Tensor, brks=None):
      "Scales a tensor using `freqhist_bins` to values between 0 and 1"
      if self.device.type == "cuda":
          return self.hist_scaled_pt(brks)
      if brks is None:
          brks = self.freqhist_bins()
      ys = np.linspace(0.0, 1.0, len(brks))
      x = self.numpy().flatten()
      x = np.interp(x, brks.numpy(), ys)
      return tensor(x).reshape(self.shape).clamp(0.0, 1.0)
  
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 9 for calling a global function with example usage: hist_scaled(brks) and returns: tensor, self