def create_other_surfs(options, text_settings):
    """Create surfaces for other purposes.

    Like the "chosen surfaces", each surface represents one
    of the available values for the option menu. These are
    surfaces used for other purposes instead of to indicate
    that an specific value is chosen.

    By the time this text was written, this function was
    being used to produce surfaces representing the available
    values (options) for the option menu when they were
    either hovered or unhovered by the mouse.
    """
    ### using the options and the text settings, create
    ### a list of surfaces representing the options
    ### rendered as text surfaces

    surfs = [render_text(str(option), **text_settings) for option in options]

    ### now calculate a new width for the surfaces, which
    ### is equal to the largest width among the existing
    ### surfaces plus 4 pixels for extra horizontal padding;
    ###
    ### the value of the padding was arbitrarily chosen
    ### based on what looked good

    new_width = (
        ## largest width among existing surfaces
        max(surf.get_width() for surf in surfs)
        ## plus 4 pixels for extra horizontal padding
        + 4
    )

    ### now iterate over each surface, blitting it over
    ### a new surface created with the new width we
    ### just calculated, and replacing the existing
    ### surface with the new one

    ## define common values for all surfaces;
    ##
    ## note that we arbitrarily increment the height by
    ## 4 pixels, just to create a nice vertical padding
    ## in the new surface when we blit the original
    ## surface over it

    height = surfs[0].get_height() + 4
    bg_color = text_settings["background_color"]

    ## iterate over the index of each surface, creating
    ## the a new one and replacing the existing one with
    ## it

    for index in range(len(surfs)):

        ## retrieve the surface
        text_surf = surfs[index]

        ## create a new surface with the new width
        new_surf = render_rect(new_width, height, bg_color)

        ## blit the original surface over the new one,
        ## with the topleft coordinates aligned, but with
        ## 2 pixels of offset in both axis;
        ##
        ## we do so to produce a nice padding all around
        ## the text blitted in the new surface, since we
        ## added 4 extra pixels in each dimension, in
        ## previous steps

        blit_aligned(
            text_surf,
            new_surf,
            retrieve_pos_from="topleft",
            assign_pos_to="topleft",
            offset_pos_by=(2, 2),
        )

        ## then replace the original surface with the
        ## new one using the index
        surfs[index] = new_surf

    ### finally build and return a dictionary containing
    ### the text surfaces we created as values, with the
    ### text for each option (the options converted to
    ### strings) as the keys

    return {str(option): surf for option, surf in zip(options, surfs)}
Create surfaces for other purposes.

    Like the "chosen surfaces", each surface represents one
    of the available values for the option menu. These are
    surfaces used for other purposes instead of to indicate
    that an specific value is chosen.

    By the time this text was written, this function was
    being used to produce surfaces representing the available
    values (options) for the option menu when they were
    either hovered or unhovered by the mouse.
    
nodezator/widget/optionmenu/creation.py