def METHOD_NAME(self, filename, pattern):
    matching_pattern = []
    with open(filename, 'r') as file_obj:
        for line in file_obj.readlines():
            if pattern in line:
                matching_pattern.append(line.rstrip("\n"))
    return matching_pattern