<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _store_inferential_results(self, value_array, index_names, attribute_name, series_name=None, column_names=None):
 """ Store the estimation results that relate to statistical inference, such as parameter estimates, standard errors, p-values, etc. Parameters value_array : 1D or 2D ndarray. Contains the values that are to be stored on the model instance. index_names : list of strings. Contains the names that are to be displayed on the 'rows' for each value being stored. There should be one element for each value of `value_array.` series_name : string or None, optional. The name of the pandas series being created for `value_array.` This kwarg should be None when `value_array` is a 1D ndarray. attribute_name : string. The attribute name that will be exposed on the model instance and related to the passed `value_array.` column_names : list of strings, or None, optional. Same as `index_names` except that it pertains to the columns of a 2D ndarray. When `value_array` is a 2D ndarray, There should be one element for each column of `value_array.` This kwarg should be None otherwise. Returns ------- None. Stores a pandas series or dataframe on the model instance. """

        if len(value_array.shape) == 1:
            assert series_name is not None
            new_attribute_value = pd.Series(value_array,
                                            index=index_names,
                                            name=series_name)
        elif len(value_array.shape) == 2:
            assert column_names is not None
            new_attribute_value = pd.DataFrame(value_array,
                                               index=index_names,
                                               columns=column_names)

        setattr(self, attribute_name, new_attribute_value)

        return None