def get_binary_annotations(request, response):
route = request.matched_route.pattern if request.matched_route else '<STR_LIT>'<EOL>annotations = {<EOL>'<STR_LIT>': request.path,<EOL>'<STR_LIT>': request.path_qs,<EOL>'<STR_LIT>': route,<EOL>'<STR_LIT>': str(response.status_code),<EOL>}<EOL>settings = request.registry.settings<EOL>if '<STR_LIT>' in settings:<EOL><INDENT>annotations.update(<EOL>settings['<STR_LIT>'](request, response)<EOL>)<EOL><DEDENT>return annotations<EOL>
Helper method for getting all binary annotations from the request.

    :param request: the Pyramid request object
    :param response: the Pyramid response object
    :returns: binary annotation dict of {str: str}