def unique_scan_name(curr_scan_name, curr_sample_keys):
    """Get a unique scan name if neccesary to avoid replacing scans
       with the same name in a dict.

    Parameters
    ----------
    curr_scan_name : str
        Unalterned name of a scan that is being loaded into a sample dict.
    curr_sample_keys : list[str]
        Names of scans that have already been loaded into said dict.

    Returns
    -------
    curr_scan_name : str
        A unique name for the scan (appends a count integer to input name).

    """
    if curr_scan_name not in curr_sample_keys:
        return curr_scan_name
    else:
        orig_scan_name = curr_scan_name
        count_int = 1
        while curr_scan_name in curr_sample_keys:
            curr_scan_name = str(orig_scan_name) + '-' + str(count_int)
            count_int += 1
    return curr_scan_name