def get_scroll_arrow_surfs(width, foreground_color, background_color):
    """Return scroll arrow surfaces w/ given settings.

    If an arrow for the given arguments doesn't exist
    already, it is created and stored on the spot,
    before being returned.

    Parameters
    ==========
    width (integer)
    foreground_color (sequence of integers)
    background_color (sequence of integers)
    """
    ### create a custom-formatted tuple from the received
    ### width, foreground color and background color, to use
    ### as a key

    key = tuple(map(str, (width, foreground_color, background_color)))

    try:
        upper_arrow, lower_arrow = STYLE_TO_SCROLL_ARROW_SURFS[key]

    except KeyError:

        upper_arrow, lower_arrow = (
            render_layered_icon(
                chars=[chr(82)],
                dimension_name="height",
                dimension_value=10,
                colors=[foreground_color],
                background_width=width,
                background_height=16,
                background_color=background_color,
                flip_y=flip_y,
            )
            for flip_y in (False, True)
        )

        STYLE_TO_SCROLL_ARROW_SURFS[key] = (upper_arrow, lower_arrow)

    ### we then return the surfs
    return upper_arrow, lower_arrow
Return scroll arrow surfaces w/ given settings.

    If an arrow for the given arguments doesn't exist
    already, it is created and stored on the spot,
    before being returned.

    Parameters
    ==========
    width (integer)
    foreground_color (sequence of integers)
    background_color (sequence of integers)
    
nodezator/widget/optionmenu/creation.py