def METHOD_NAME(self, to_color_space, preserve_alpha=True):
    if to_color_space == self.color_space and preserve_alpha:
        return self
    else:
        pixels = pixels_as_float(self.pixels)
        converted = convert_color(
            pixels, self.color_space, to_color_space, preserve_alpha
        )
        if converted is None:
            return None
        return Image(converted, to_color_space)