def whether_prefix(coords):
    """Determine whether gene IDs should be prefixed with nucleotide IDs.

    Parameters
    ----------
    coords : dict
        Gene coordinates table.

    Returns
    -------
    bool
        Whether gene IDs should be prefixed.

    See Also
    --------
    read_gene_coords

    Notes
    -----
    It is based on a simple mechanism which checks whether there are duplicate
    gene IDs, and if so, all gene IDs should be prefixed to avoid confusion.
    """
    genes = {}
    for nucl, queue in coords.items():
        for _, is_start, _, gid in queue:
            if gid not in genes:
                genes[gid] = is_start
            elif genes[gid] == is_start:
                return True
    return False