docs: def backtrack(problem, variable_heuristic='', value_heuristic='', inference=True):
      '''
      Backtracking search.
  
      variable_heuristic is the heuristic for variable choosing, can be
      MOST_CONSTRAINED_VARIABLE, HIGHEST_DEGREE_VARIABLE, or blank for simple
      ordered choosing.
      value_heuristic is the heuristic for value choosing, can be
      LEAST_CONSTRAINING_VALUE or blank for simple ordered choosing.
      '''
      assignment = {}
      domains = deepcopy(problem.domains)
  
      if variable_heuristic == MOST_CONSTRAINED_VARIABLE:
          variable_chooser = _most_constrained_variable_chooser
      elif variable_heuristic == HIGHEST_DEGREE_VARIABLE:
          variable_chooser = _highest_degree_variable_chooser
      else:
          variable_chooser = _basic_variable_chooser
  
      if value_heuristic == LEAST_CONSTRAINING_VALUE:
          values_sorter = _least_constraining_values_sorter
      else:
          values_sorter = _basic_values_sorter
      return _backtracking(problem,
                           assignment,
                           domains,
                           variable_chooser,
                           values_sorter,
                           inference=inference)