code: def _get_liblinear_solver_type(multi_class, penalty, loss, dual):
      """Find the liblinear magic number for the solver.
  
      This number depends on the values of the following attributes:
        - multi_class
        - penalty
        - loss
        - dual
  
      The same number is also internally used by LibLinear to determine
      which solver to use.
      """
      # nested dicts containing level 1: available loss functions,
      # level2: available penalties for the given loss function,
      # level3: wether the dual solver is available for the specified
      # combination of loss function and penalty
      _solver_type_dict = {
          "logistic_regression": {
              "l1": {False: 6},
              "l2": {False: 0, True: 7},
          },
          "hinge": {"l2": {True: 3}},
          "squared_hinge": {
              "l1": {False: 5},
              "l2": {False: 2, True: 1},
          },
          "epsilon_insensitive": {"l2": {True: 13}},
          "squared_epsilon_insensitive": {"l2": {False: 11, True: 12}},
          "crammer_singer": 4,
      }
  
      if multi_class == "crammer_singer":
          return _solver_type_dict[multi_class]
      elif multi_class != "ovr":
          raise ValueError(
              "`multi_class` must be one of `ovr`, "
              "`crammer_singer`, got %r" % multi_class
          )
  
      _solver_pen = _solver_type_dict.get(loss, None)
      if _solver_pen is None:
          error_string = "loss='%s' is not supported" % loss
      else:
          _solver_dual = _solver_pen.get(penalty, None)
          if _solver_dual is None:
              error_string = (
                  "The combination of penalty='%s' "
                  "and loss='%s' is not supported" % (penalty, loss)
              )
          else:
              solver_num = _solver_dual.get(dual, None)
              if solver_num is None:
                  error_string = (
                      "The combination of penalty='%s' and "
                      "loss='%s' are not supported when dual=%s"
                      % (penalty, loss, dual)
                  )
              else:
                  return solver_num
      raise ValueError(
          "Unsupported set of arguments: %s, "
          "Parameters: penalty=%r, loss=%r, dual=%r"
          % (error_string, penalty, loss, dual)
      )
  
imports: from __future__ import print_function
  import numpy
  import scipy.sparse
  import warnings
  from abc import ABCMeta, abstractmethod
  from .None import libsvm, liblinear
  from .None import libsvm_sparse
  from ..base import BaseEstimator, ClassifierMixin
  from ..preprocessing import LabelEncoder
  from ..utils.multiclass import _ovr_decision_function
  from ..utils import check_array, check_consistent_length, check_random_state
  from ..utils import column_or_1d, check_X_y
  from ..utils import compute_class_weight, deprecated
  from ..utils.extmath import safe_sparse_dot
  from ..utils.validation import check_is_fitted
  from ..utils.multiclass import check_classification_targets
  from ..externals import six
  from ..exceptions import ChangedBehaviorWarning
  from ..exceptions import ConvergenceWarning
  from ..exceptions import NotFittedError
label_desc: Use image node_id 2 for calling a global function with example usage: _get_liblinear_solver_type(multi_class, penalty, loss, dual) and returns: _solver_type_dict, solver_num