def get_ends(bed3):
    """Get the BED coordinates of the last nucleotide of each record."""
    ends = bed3.copy()
    ends['chrom_start'] = ends['chrom_end'] - 1
    return ends.sort_values(by=['chrom', 'chrom_start'])