def extract_image_class(filename: str) -> str:
    """
    Extract the class label for a given filename.

    Args:
        filename: the filename to extract a class label for

    Returns:
        a class label based on the image's filename

    """
    # extract the filename itself without the absolute path
    filename = filename.split('/')[-1]
    # remove any unique descriptive text following a dash
    filename = filename.split('-')[0]
    # remove any spaces for simplicity
    filename = filename.replace(' ', '')
    # replace file-type information with nothing
    filename = filename.replace('.gif', '').replace('.png', '')

    return filename