code: def median_blur(tens: Tensor, ksize: int) -> Tensor:
      if tens.dtype == np.float32 and ksize not in {3, 5}:
          raise ValueError(
              "Invalid ksize value {}. For a float32 image the only valid ksize values are 3 and 5".format(
                  ksize
              )
          )
  
      return cv.medianBlur(tens, ksize=ksize)
  
imports: import cv2
  import numpy
  from ..coreten import Tensor
label_desc: Use image node_id 3 for calling a global function with example usage: median_blur(tens, ksize) and returns: cv