nodes: 0, module; 1, function_definition; 2, function_name:iter_cookie_browse_sorting; 3, parameters; 4, block; 5, identifier:cookies; 6, expression_statement; 7, try_statement; 8, string; 9, block; 10, except_clause; 11, string_content:Get sorting-cookie from cookies dictionary.
  
      :yields: tuple of path and sorting property
      :ytype: 2-tuple of strings; 12, expression_statement; 13, for_statement; 14, as_pattern; 15, block; 16, assignment; 17, pattern_list; 18, call; 19, block; 20, tuple; 21, as_pattern_target; 22, expression_statement; 23, identifier:data; 24, call; 25, identifier:path; 26, identifier:prop; 27, attribute; 28, argument_list; 29, expression_statement; 30, identifier:ValueError; 31, identifier:TypeError; 32, identifier:KeyError; 33, identifier:e; 34, call; 35, attribute; 36, argument_list; 37, identifier:json; 38, identifier:loads; 39, call; 40, yield; 41, attribute; 42, argument_list; 43, call; 44, identifier:encode; 45, string; 46, attribute; 47, argument_list; 48, expression_list; 49, identifier:logger; 50, identifier:exception; 51, identifier:e; 52, attribute; 53, argument_list; 54, string_content:ascii; 55, call; 56, identifier:decode; 57, string; 58, identifier:path; 59, identifier:prop; 60, identifier:cookies; 61, identifier:get; 62, string; 63, string; 64, attribute; 65, argument_list; 66, string_content:utf-8; 67, string_content:browse-sorting; 68, string_content:e30=; 69, identifier:base64; 70, identifier:b64decode; 71, identifier:data
code: def iter_cookie_browse_sorting(cookies):
      '''
      Get sorting-cookie from cookies dictionary.
  
      :yields: tuple of path and sorting property
      :ytype: 2-tuple of strings
      '''
      try:
          data = cookies.get('browse-sorting', 'e30=').encode('ascii')
          for path, prop in json.loads(base64.b64decode(data).decode('utf-8')):
              yield path, prop
      except (ValueError, TypeError, KeyError) as e:
          logger.exception(e)