code: def check_length_of_initial_values(self, init_values):
          
          # Calculate the expected number of index parameters
          num_index_coefs = self.design.shape[1]
  
          if init_values.shape[0] != num_index_coefs:
              msg_1 = "The initial values are of the wrong dimension."
              msg_2 = "It should be of dimension {}"
              msg_3 = "But instead it has dimension {}"
              raise ValueError(msg_1 +
                               msg_2.format(num_index_coefs) +
                               msg_3.format(init_values.shape[0]))
  
          return None
docs: Ensures that `init_values` is of the correct length. Raises a helpful
          ValueError if otherwise.
  
          Parameters
          ----------
          init_values : 1D ndarray.
              The initial values to start the optimization process with. There
              should be one value for each index coefficient, outside intercept
              parameter, and shape parameter being estimated.
  
          Returns
          -------
          None.