nodes: 0, module; 1, function_definition; 2, function_name:get_deffacts; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, return_statement; 8, comment:"""Return the existing deffacts sorted by the internal order"""; 9, call; 10, identifier:sorted; 11, argument_list; 12, call; 13, keyword_argument; 14, attribute; 15, argument_list; 16, identifier:key; 17, lambda; 18, identifier:self; 19, identifier:_get_by_type; 20, identifier:DefFacts; 21, lambda_parameters; 22, attribute; 23, identifier:d; 24, identifier:d; 25, identifier:order
code: def get_deffacts(self):
          """Return the existing deffacts sorted by the internal order"""
          return sorted(self._get_by_type(DefFacts), key=lambda d: d.order)