<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def concat_with_pipe(x, cols=None):
 """Concatenate a `pd.Series` separated by `|`, drop `None` or `np.nan`"""

    cols = cols or x.index
    return '|'.join([x[i] for i in cols if x[i] not in [None, np.nan]])