'Parser function for HTTP request path suffixes
parses the suffix argument (the trailing parts of the URL) of the LTI2.0 REST handler.
must be of the form "user/<anon_id>".  Returns anon_id if match found, otherwise raises LTIError
Arguments:
suffix (unicode):  suffix to parse
Returns:
unicode: anon_id if match found
Raises:
LTIError if suffix cannot be parsed or is not in its expected form'

def parse_lti_2_0_handler_suffix(self, suffix):

    if suffix:
        match_obj = LTI_2_0_REST_SUFFIX_PARSER.match(suffix)
        if match_obj:
            return match_obj.group('anon_id')
    msg = 'No    valid    user    id    found    in    endpoint    URL'
    log.info('[LTI]:    {}'.format(msg))
    raise LTIError(msg)
