def get_chromosome_sizes(fasta_path):
    """Returns a dictionary that maps chromosome name to its size in base pairs.

    Args:
        fasta_path (str): Path of the reference genome .fasta. This function will load the corresponding .fai file to
            get the chrom. sizes.

    Return:
        dict: chromosome name to size in base pairs.
    """
    chrom_size_lookup = {}
    with open(f"{fasta_path}.fai", "rt") as fai_file:
        for line in fai_file:
            fields = line.split()
            chrom = fields[0]
            size = int(fields[1])
            chrom_size_lookup[chrom] = size
    return chrom_size_lookup