def user_loc_string_to_value(axis_tag, user_loc):
if axis_tag == "<STR_LIT>":<EOL><INDENT>try:<EOL><INDENT>value = _nospace_lookup(WEIGHT_CODES, user_loc)<EOL><DEDENT>except KeyError:<EOL><INDENT>return None<EOL><DEDENT>return class_to_value("<STR_LIT>", value)<EOL><DEDENT>elif axis_tag == "<STR_LIT>":<EOL><INDENT>try:<EOL><INDENT>value = _nospace_lookup(WIDTH_CODES, user_loc)<EOL><DEDENT>except KeyError:<EOL><INDENT>return None<EOL><DEDENT>return class_to_value("<STR_LIT>", value)<EOL><DEDENT>raise NotImplementedError<EOL>
Go from Glyphs UI strings to user space location.
    Returns None if the string is invalid.

    >>> user_loc_string_to_value('wght', 'ExtraLight')
    200
    >>> user_loc_string_to_value('wdth', 'SemiCondensed')
    87.5
    >>> user_loc_string_to_value('wdth', 'Clearly Not From Glyphs UI')