<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def readMAP(fileName, prefix):
 """Reads the MAP file. :param fileName: the name of the ``map`` file. :type fileName: str :returns: a list of tuples, representing the ``map`` file. While reading the ``map`` file, it saves a file (``prefix.duplicated_marker_names``) containing the name of the unique duplicated markers. """

    # Saving the MAP file
    mapF = None
    with open(fileName, 'r') as inputFile:
        mapF = [
            tuple(i.rstrip("\r\n").split("\t")) for i in inputFile.readlines()
        ]

    # Test for uniqueness of names
    marker_names = np.array([i[1] for i in mapF])
    nb_with_same_name = len(marker_names) - len(np.unique(marker_names))
    if nb_with_same_name > 0:
        logger.info("  - {} markers with same name".format(nb_with_same_name))
        u, indices = np.unique(marker_names, return_index=True)
        duplicated_indices = np.setdiff1d(np.arange(len(marker_names)),
                                          indices)
        duplicated_indices = np.in1d(marker_names,
                                     marker_names[duplicated_indices])
        marker_chr_pos = np.array([(i[0], i[3]) for i in mapF],
                                  dtype=[("chr", int),
                                         ("pos", int)])[duplicated_indices]
        marker_names = marker_names[duplicated_indices]
        try:
            duplicated_marker_names = open(prefix + ".duplicated_marker_names",
                                           "w")
        except IOError:
            msg = "{}.duplicated_marker_names: can't write file".format(prefix)
            raise ProgramError(msg)
        for i in xrange(len(marker_names)):
            print >>duplicated_marker_names, "\t".join([marker_names[i]] +
                                                       map(str,
                                                           marker_chr_pos[i]))
        duplicated_marker_names.close()

    return mapF