<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_geometry(geometry, ratio=None):
 """ Enhanced parse_geometry parser with percentage support. """

    if "%" not in geometry:
        # fall back to old parser
        return xy_geometry_parser(geometry, ratio)
    # parse with float so geometry strings like "42.11%" are possible
    return float(geometry.strip("%")) / 100.0