<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def transform_expression_columns(df, fn=np.log2, prefix='Intensity '):
 """ Apply transformation to expression columns. Default is log2 transform to expression columns beginning with Intensity :param df: :param prefix: The column prefix for expression columns :return: """

    df = df.copy()

    mask = np.array([l.startswith(prefix) for l in df.columns.values])
    df.iloc[:, mask] = fn(df.iloc[:, mask])

    df.replace([np.inf, -np.inf], np.nan, inplace=True)
    
    return df