code: def check_length_of_initial_values(self, init_values):
          
          # Figure out how many shape parameters we should have and how many
          # index coefficients we should have
          num_nests = self.rows_to_nests.shape[1]
          num_index_coefs = self.design.shape[1]
  
          assumed_param_dimensions = num_index_coefs + num_nests
          if init_values.shape[0] != assumed_param_dimensions:
              msg = "The initial values are of the wrong dimension"
              msg_1 = "It should be of dimension {}"
              msg_2 = "But instead it has dimension {}"
              raise ValueError(msg +
                               msg_1.format(assumed_param_dimensions) +
                               msg_2.format(init_values.shape[0]))
  
          return None
docs: Ensures that the initial values are of the correct length.