nodes: 0, module; 1, function_definition; 2, function_name:sort_elements_by_child_values; 3, parameters; 4, block; 5, identifier:obj_pyxb; 6, identifier:child_name_list; 7, expression_statement; 8, expression_statement; 9, comment:"""In-place sort simple or complex elements in a PyXB object by values they contain
      in child elements.
  
      Args:
        obj_pyxb: PyXB object
  
        child_name_list: list of str
          List of element names that are direct children of the PyXB object.
  
      """; 10, call; 11, attribute; 12, argument_list; 13, identifier:obj_pyxb; 14, identifier:sort; 15, keyword_argument; 16, identifier:key; 17, lambda; 18, lambda_parameters; 19, list_comprehension; 20, identifier:x; 21, call; 22, for_in_clause; 23, identifier:get_auto; 24, argument_list; 25, identifier:n; 26, identifier:child_name_list; 27, call; 28, identifier:getattr; 29, argument_list; 30, identifier:x; 31, identifier:n
code: def sort_elements_by_child_values(obj_pyxb, child_name_list):
      """In-place sort simple or complex elements in a PyXB object by values they contain
      in child elements.
  
      Args:
        obj_pyxb: PyXB object
  
        child_name_list: list of str
          List of element names that are direct children of the PyXB object.
  
      """
      obj_pyxb.sort(key=lambda x: [get_auto(getattr(x, n)) for n in child_name_list])