nodes: 0, module; 1, function_definition; 2, function_name:_sort_layers; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, expression_statement; 8, comment:"""Sort the layers by depth."""; 9, assignment; 10, attribute; 11, call; 12, identifier:self; 13, identifier:_layers; 14, identifier:OrderedDict; 15, argument_list; 16, call; 17, identifier:sorted; 18, argument_list; 19, call; 20, keyword_argument; 21, attribute; 22, argument_list; 23, identifier:key; 24, lambda; 25, attribute; 26, identifier:items; 27, lambda_parameters; 28, subscript; 29, identifier:self; 30, identifier:_layers; 31, identifier:t; 32, identifier:t; 33, integer:0
code: def _sort_layers(self):
          """Sort the layers by depth."""
          self._layers = OrderedDict(sorted(self._layers.items(), key=lambda t: t[0]))