docs: def _init_minimizer(self, minimizer, **minimizer_options):
          """
          Takes a :class:`~symfit.core.minimizers.BaseMinimizer` and instantiates
          it, passing the jacobian and constraints as appropriate for the
          minimizer.
  
          :param minimizer: :class:`~symfit.core.minimizers.BaseMinimizer` to
              instantiate.
          :param **minimizer_options: Further options to be passed to the
              minimizer on instantiation.
          :returns: instance of :class:`~symfit.core.minimizers.BaseMinimizer`.
          """
  
          if isinstance(minimizer, BaseMinimizer):
              return minimizer
          if issubclass(minimizer, BasinHopping):
              minimizer_options['local_minimizer'] = self._init_minimizer(
                  self._determine_minimizer()
              )
          if issubclass(minimizer, GradientMinimizer):
              # If an analytical version of the Jacobian exists we should use
              # that, otherwise we let the minimizer estimate it itself.
              # Hence the check of jacobian_model, as this is the
              # py function version of the analytical jacobian.
              if hasattr(self.model, 'jacobian_model') and hasattr(self.objective, 'eval_jacobian'):
                  minimizer_options['jacobian'] = self.objective.eval_jacobian
          if issubclass(minimizer, HessianMinimizer):
              # If an analytical version of the Hessian exists we should use
              # that, otherwise we let the minimizer estimate it itself.
              # Hence the check of hessian_model, as this is the
              # py function version of the analytical hessian.
              if hasattr(self.model, 'hessian_model') and hasattr(self.objective, 'eval_hessian'):
                  minimizer_options['hessian'] = self.objective.eval_hessian
  
          if issubclass(minimizer, ConstrainedMinimizer):
              # set the constraints as MinimizeModel. The dependent vars of the
              # constraint are set to None since their value is irrelevant.
              constraint_objectives = []
              for constraint in self.constraints:
                  data = self.data  # No copy, share state
                  data.update({var: None for var in constraint.dependent_vars})
                  constraint_objectives.append(MinimizeModel(constraint, data))
              minimizer_options['constraints'] = constraint_objectives
          return minimizer(self.objective, self.model.params, **minimizer_options)