nodes: 0, module; 1, function_definition; 2, function_name:sort_func; 3, parameters; 4, block; 5, default_parameter; 6, default_parameter; 7, expression_statement; 8, return_statement; 9, identifier:variant; 10, identifier:VARIANT1; 11, identifier:case_sensitive; 12, False; 13, comment:"""A function generator that can be used for sorting.
  
      All keywords are passed to `normalize()` and generate keywords that
      can be passed to `sorted()`::
  
        >>> key = sort_func()
        >>> print(sorted(["fur", "far"], key=key))
        [u'far', u'fur']
  
      Please note, that `sort_func` returns a function.
      """; 14, lambda; 15, lambda_parameters; 16, call; 17, identifier:x; 18, identifier:normalize; 19, argument_list; 20, identifier:x; 21, keyword_argument; 22, keyword_argument; 23, identifier:variant; 24, identifier:variant; 25, identifier:case_sensitive; 26, identifier:case_sensitive
code: def sort_func(variant=VARIANT1, case_sensitive=False):
      """A function generator that can be used for sorting.
  
      All keywords are passed to `normalize()` and generate keywords that
      can be passed to `sorted()`::
  
        >>> key = sort_func()
        >>> print(sorted(["fur", "far"], key=key))
        [u'far', u'fur']
  
      Please note, that `sort_func` returns a function.
      """
      return lambda x: normalize(
          x, variant=variant, case_sensitive=case_sensitive)