code: def convenience_calc_gradient(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]
  
          return general_gradient(*args, ridge=self.ridge, weights=self.weights)
docs: Calculates the gradient of the log-likelihood for this model / dataset.