code: def median_images(images):
          
          images_data = np.array([image.data for image in images])
          median_image_data = np.median(images_data, axis=0)
  
          an_image = images[0]
          return type(an_image)(
              median_image_data.astype(
                  an_image.data.dtype),
              an_image.frame)
docs: Create a median Image from a list of Images.
  
          Parameters
          ----------
          :obj:`list` of :obj:`Image`
              A list of Image objects.
  
          Returns
          -------
          :obj:`Image`
              A new Image of the same type whose data is the median of all of
              the images' data.