def make_dico_contig_lengths_from_bam_handler(bamh):
    """
    create a dictionary of contig with their length as values
    :param bamh: bam handle from pysam bam/cram reader
    :return: dictionary of contigs:lengths
    """
    return dict(zip(bamh.references, bamh.lengths))