def findSubstringAndReturnError(pattern, file_path, error_message):
    text = readFile(file_path)
    if (pattern in text):
        error_messages = [((file_path + ': ') + error_message)]
        for (i, line) in enumerate(text.splitlines()):
            if (pattern in line):
                error_messages.append(('  %s:%s' % (file_path, (i + 1))))
        return error_messages
    return []
def findSubstringAndReturnError(pattern, file_path, error_message):
    text = readFile(file_path)
    if (pattern in text):
        error_messages = [((file_path + ': ') + error_message)]
        for (i, line) in enumerate(text.splitlines()):
            if (pattern in line):
                error_messages.append(('  %s:%s' % (file_path, (i + 1))))
        return error_messages
    return []