<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def benchmark_is_constant():
 """This benchmarks the "is_constant" function from ``pmdarima.arima.utils`` This was added in 0.6.2. """

    # WINNER!
    def is_const1(x):
        """This is the version in Pyramid 0.6.2.

        Parameters
        ----------
        x : np.ndarray
            This is the array.
        """
        return (x == x[0]).all()

    def is_const2(x):
        """This should ostensibly only take O(N) rather than O(2N) like
        its predecessor. But we'll see...

        Parameters
        ----------
        x : np.ndarray
            This is the array.
        """
        return np.unique(x).shape[0] == 1

    x = np.random.choice(np.arange(10), 1000000, replace=True)
    _do_time(is_const1, 25, x)
    _do_time(is_const2, 25, x)