import re


def find_linenumbers_for_filename_metadata(pipeline):
    """
    Find the linenumbers that contain the filename metadata info within the Metadata module in a CellProfiler pipeline.
    
    * pipeline: a list where each item is a line from a CellProfiler `*.cppipe` file.
    """

    metadata_filename_linenumber_list = []

    for ind, line in enumerate(pipeline):
        if re.match(r'^\s*Metadata source:File name', line) is not None:
            metadata_filename_linenumber_list.append(ind)
            
    return metadata_filename_linenumber_list