def generate_status_bar(percent: float, img_size: int):
    """
    take a percent and create a progress bar
    :param percent: percent complete
    :param img_size: size of the image MB
    :return: progress bar
    """
    bar_length = 50
    number_bars = round((int(str(percent).split(".")[0])) / (100 / bar_length))  # calculate number of bars
    progress_bar = "["

    current_write = img_size * (percent / 100)

    for i in range(number_bars):
        if i == number_bars - 1:
            progress_bar += ">"
        else:
            progress_bar += "="
    for i in range(bar_length - number_bars):
        progress_bar += " "
    return progress_bar + "] " + \
        str(round(percent)) + "% - " + str(round(current_write)) + "/" + str(img_size) + " MB Written"