code: def convenience_calc_hessian(self, params):
          
          shapes, intercepts, betas = self.convenience_split_params(params)
  
          args = [betas,
                  self.design_3d,
                  self.alt_id_vector,
                  self.rows_to_obs,
                  self.rows_to_alts,
                  self.rows_to_mixers,
                  self.choice_vector,
                  self.utility_transform]
  
          approx_hess =\
              general_bhhh(*args, ridge=self.ridge, weights=self.weights)
  
          # Account for the constrained position when presenting the results of
          # the approximate hessian.
          if self.constrained_pos is not None:
              for idx_val in self.constrained_pos:
                  approx_hess[idx_val, :] = 0
                  approx_hess[:, idx_val] = 0
                  approx_hess[idx_val, idx_val] = -1
  
          return approx_hess
docs: Calculates the hessian of the log-likelihood for this model / dataset.
          Note that this function name is INCORRECT with regard to the actual
          actions performed. The Mixed Logit model uses the BHHH approximation
          to the Fisher Information Matrix in place of the actual hessian.