def make_glyph(number, glyphs="<STR_LIT>", lower_bound=<NUM_LIT:0>, upper_bound=<NUM_LIT:100>, enable_boundary_glyphs=False):
<EOL>if lower_bound >= upper_bound:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>elif number <= lower_bound:<EOL><INDENT>return glyphs[<NUM_LIT:0>]<EOL><DEDENT>elif number >= upper_bound:<EOL><INDENT>return glyphs[-<NUM_LIT:1>]<EOL><DEDENT>if enable_boundary_glyphs:<EOL><INDENT>glyphs = glyphs[<NUM_LIT:1>:-<NUM_LIT:1>]<EOL><DEDENT>adjusted_value = (number - lower_bound) / (upper_bound - lower_bound)<EOL>glyph_index = int(len(glyphs) * adjusted_value)<EOL>return glyphs[glyph_index]<EOL>
Returns a single glyph from the list of glyphs provided relative to where
the number is in the range (by default a percentage value is expected).

This can be used to create an icon based representation of a value with an
arbitrary number of glyphs (e.g. 4 different battery status glyphs for
battery percentage level).

:param number: The number being represented.  By default a percentage value\
between 0 and 100 (but any range can be defined with lower_bound and\
upper_bound).
:param glyphs: Either a string of glyphs, or an array of strings.  Using an array\
of strings allows for additional pango formatting to be applied such that\
different colors could be shown for each glyph).
:param lower_bound:  A custom lower bound value for the range.
:param upper_bound:  A custom upper bound value for the range.
:param enable_boundary_glyphs: Whether the first and last glyphs should be used\
for the special case of the number being <= lower_bound or >= upper_bound\
respectively.
:returns: The glyph found to represent the number