<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_missing(X, y=None):
 """ Removes rows that contain np.nan values in data. If y is given, X and y will be filtered together so that their shape remains identical. For example, rows in X with nans will also remove rows in y, or rows in y with np.nans will also remove corresponding rows in X. Parameters X : array-like Data in shape (m, n) that possibly contains np.nan values y : array-like, optional Data in shape (m, 1) that possibly contains np.nan values Returns -------- X' : np.array Possibly transformed X with any row containing np.nan removed y' : np.array If y is given, will also return possibly transformed y to match the shape of X'. Notes ------ This function will return either a np.array if only X is passed or a tuple if both X and y is passed. Because all return values are indexable, it is important to recognize what is being passed to the function to determine its output. """

    if y is not None:
        return filter_missing_X_and_y(X, y)
    else:
        return X[~np.isnan(X).any(axis=1)]