def _check_invalid_udfs(udf_columns):
    """
    Checks if given udf columns are valid. Raises ValueError if they are not.

    :param udf_columns: A list of udf columns.
    """
    for col in udf_columns:
        for index in col.column_indices:
            if index is None:
                raise ValueError(
                    'Column passed to the udf function must be a column in the DataFrame, i.e, df[col] or df[[col1, col2]]. Other types of Column are not supported.'
                    )
