nodes: 0, module; 1, function_definition; 2, function_name:mount; 3, parameters; 4, block; 5, identifier:self; 6, identifier:prefix; 7, identifier:adapter; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, for_statement; 12, comment:"""Registers a connection adapter to a prefix.
  
          Adapters are sorted in descending order by prefix length.
          """; 13, assignment; 14, assignment; 15, identifier:key; 16, identifier:keys_to_move; 17, block; 18, subscript; 19, identifier:adapter; 20, identifier:keys_to_move; 21, list_comprehension; 22, expression_statement; 23, attribute; 24, identifier:prefix; 25, identifier:k; 26, for_in_clause; 27, if_clause; 28, assignment; 29, identifier:self; 30, identifier:adapters; 31, identifier:k; 32, attribute; 33, comparison_operator:len(k) < len(prefix); 34, subscript; 35, call; 36, identifier:self; 37, identifier:adapters; 38, call; 39, call; 40, attribute; 41, identifier:key; 42, attribute; 43, argument_list; 44, identifier:len; 45, argument_list; 46, identifier:len; 47, argument_list; 48, identifier:self; 49, identifier:adapters; 50, attribute; 51, identifier:pop; 52, identifier:key; 53, identifier:k; 54, identifier:prefix; 55, identifier:self; 56, identifier:adapters
code: def mount(self, prefix, adapter):
          """Registers a connection adapter to a prefix.
  
          Adapters are sorted in descending order by prefix length.
          """
          self.adapters[prefix] = adapter
          keys_to_move = [k for k in self.adapters if len(k) < len(prefix)]
  
          for key in keys_to_move:
              self.adapters[key] = self.adapters.pop(key)