def METHOD_NAME(file_name):
    """
    Check if file contains carriage returns at the end of lines
    and return the number of carriage return lines.
    """
    f = open(file_name, 'r+b')
    key_positions = []
    for num, line in enumerate(f.readlines()):
        if b'\r\n' in line:
            key_positions.append(num)
    if len(key_positions) > 0:
        if len(key_positions)>10:
            line_numbers = key_positions[:10] + [" ..."]
        else:
            line_numbers = key_positions
        debug.info(0, '\nFound ' + str(len(key_positions)) + ' carriage returns in ' +
                   str(file_name) + ' (lines ' + ",".join(str(x) for x in line_numbers) + ')')
    f.close()
    return len(key_positions)