def METHOD_NAME(self, in_image, im_out, wrap, out_dtype, safe):
    output_type = type(im_out) if wrap else type(im_out[0])
    converted_im, *_ = convert_data_type(in_image, output_type, wrap_sequence=wrap, dtype=out_dtype, safe=safe)
    # check output is desired type
    if not wrap:
        converted_im = converted_im[0]
        im_out = im_out[0]
    self.assertEqual(type(converted_im), type(im_out))
    assert_allclose(converted_im, im_out)
    # check dtype is unchanged
    if isinstance(in_image[0], (np.ndarray, torch.Tensor)):
        if out_dtype is None:
            self.assertEqual(converted_im.dtype, im_out.dtype)
        else:
            _out_dtype = get_equivalent_dtype(out_dtype, output_type)
            self.assertEqual(converted_im.dtype, _out_dtype)