<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _apply_mask( data: np.ndarray, encoded_fill_values: list, decoded_fill_value: Any, dtype: Any, ) -> np.ndarray: """Mask all matching values in a NumPy arrays."""

    data = np.asarray(data, dtype=dtype)
    condition = False
    for fv in encoded_fill_values:
        condition |= data == fv
    return np.where(condition, decoded_fill_value, data)