<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_alpha_data(data: np.ndarray, kwargs) -> Union[float, np.ndarray]: """Get alpha values for all data points. Parameters alpha: Callable or float This can be a fixed value or a function of the data. """

    alpha = kwargs.pop("alpha", 1)
    if hasattr(alpha, "__call__"):
        return np.vectorize(alpha)(data)
    return alpha