<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _filter_variable_indices(mask, column_selection):
 """ Returns column indices restricted to the variable columns as determined by the given mask. Parameters mask : ndarray(N, dtype=bool) Array indicating the variable columns. column_selection : ndarray(k, dtype=int) Column indices to be filtered and mapped. Returns ------- ix : ndarray(l, dtype=int) Column indices restricted to the variable columns, mapped to the correct index range. """

    a = np.where(mask)[0]
    b = column_selection[np.in1d(column_selection, a)]
    return np.searchsorted(a, b)