def METHOD_NAME(self):
    if (
        self._gradient_curve is None  # Uninitialized gradient
        or len(self._gradient_curve[0])
        != self.pixel_count  # Incorrect size
    ):
        self._generate_gradient_curve(
            self._config["gradient"],
            self.pixel_count,
        )