<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def infer_partial_network(regressor_type, regressor_kwargs, tf_matrix, tf_matrix_gene_names, target_gene_name, target_gene_expression, include_meta=False, early_stop_window_length=EARLY_STOP_WINDOW_LENGTH, seed=DEMON_SEED):
 """ Ties together regressor model training with regulatory links and meta data extraction. :param regressor_type: string. Case insensitive. :param regressor_kwargs: dict of key-value pairs that configures the regressor. :param tf_matrix: numpy matrix. The feature matrix X to use for the regression. :param tf_matrix_gene_names: list of transcription factor names corresponding to the columns of the tf_matrix used to train the regression model. :param target_gene_name: the name of the target gene to infer the regulatory links for. :param target_gene_expression: the expression profile of the target gene. Numpy array. :param include_meta: whether to also return the meta information DataFrame. :param early_stop_window_length: window length of the early stopping monitor. :param seed: (optional) random seed for the regressors. :return: if include_meta == True, return links_df, meta_df link_df: a Pandas DataFrame['TF', 'target', 'importance'] containing inferred regulatory links and their connection strength. meta_df: a Pandas DataFrame['target', 'meta', 'value'] containing meta information regarding the trained regression model. """

    def fn():
        (clean_tf_matrix, clean_tf_matrix_gene_names) = clean(tf_matrix, tf_matrix_gene_names, target_gene_name)

        try:
            trained_regressor = fit_model(regressor_type, regressor_kwargs, clean_tf_matrix, target_gene_expression,
                                          early_stop_window_length, seed)
        except ValueError as e:
            raise ValueError("Regression for target gene {0} failed. Cause {1}.".format(target_gene_name, repr(e)))

        links_df = to_links_df(regressor_type, regressor_kwargs, trained_regressor, clean_tf_matrix_gene_names,
                               target_gene_name)

        if include_meta:
            meta_df = to_meta_df(trained_regressor, target_gene_name)

            return links_df, meta_df
        else:
            return links_df

    fallback_result = (None, None) if include_meta else None

    return retry(fn,
                 fallback_result=fallback_result,
                 warning_msg='infer_data failed for target {0}'.format(target_gene_name))