Project: s41467-024-47569-x | Function: predict_protein_location_1epoch (python)

system: You are an expert Python programmer implementing algorithms from scientific papers.
Complete the masked function based on the algorithm description.
Follow Python best practices and maintain consistent code style.
Return **only** the complete Python function code.

user: Complete this Python function:

**DESCRIPTION:** CLASP spatial prediction algorithm that infers protein subcellular localization by analyzing cross-links to localization markers with defined 4nm distance constraints

**KEY TERMS:** {
  "predicted_gene": "target protein for localization prediction",
  "predicting_gene": "localization marker protein with known location",
  "predicted_subcellular_location": "inferred spatial compartment location",
  "predicted_topology": "inferred membrane protein topology",
  "crosslinks": "inter-protein cross-links within 4nm distance constraint"
}

**CONTEXT CODE:** """
@author: Julia Ruta
Script predicting the location of a protein based cross-link
information and localization marker. A localization marker
is a protein with a unique subcellular location, or in case
of membrane proteins a unique location of a topological
domain.
"""
import pandas as pd
import numpy as np

def predict_protein_location_1epoch(proteins):
    """
    method predicting the location of proteins via
    cross-links to a localization marker
    :param proteins:
    :return: new_data
    """
    # MASKED: CLASP spatial prediction algorithm that infers protein subcellular localization by analyzing cross-links to localization markers with defined 4nm distance constraints
    raise NotImplementedError("This function is masked for testing purposes.")

def combine_predicted_information(proteins,combined_data):
    """
    method combining all predicted locations and transmembrane
    as well as topology information for a protein
    :param proteins:
    :param combined_data:
    :return: new_data
    """
    gene_helper_list = []

    predicted_gene_list = []
    predicting_gene_list = []
    predicting_gene_residue_list = []
    predicted_gene_residue_list = []
    crosslinks_list = []
    predicted_by_transmembrane_list = []
    predicted_subcellular_location_list = []
    predicted_topology_list = []
    transmembrane_regions_list = []
    is_localization_marker_list = []

    combined_data['transmembrane'] = combined_data['transmembrane'].fillna("")
    for i in proteins.index:
        gene = proteins.iloc[i]['predicted_gene']

        if gene in gene_helper_list:
            continue

        gene_helper_list.append(gene)

        tms_list = combined_data.loc[combined_data['gene'] == gene]['transmembrane'].tolist()
        tms = list(filter(None,tms_list))

        sub = proteins.loc[proteins['predicted_gene'] == gene]

        for j in list(range(sub.shape[0])):
            xlink = sub.iloc[j]['predicting_crosslinks']
            xlink_split = xlink.split('-')

            predicted_gene_list.append(gene)
            predicted_gene_residue_list.append(int(xlink_split[3]))
            predicting_gene_residue_list.append(int(xlink_split[1]))
            predicting_gene_list.append(sub.iloc[j]['predicting_gene'])
            predicted_subcellular_location_list.append(sub.iloc[j]['predicted_subcellular_location'])
            predicted_topology_list.append(sub.iloc[j]['predicted_topology'])
            crosslinks_list.append(sub.iloc[j]['predicting_crosslinks'])
            predicted_by_transmembrane_list.append(sub.iloc[j]['predicted_by_transmembrane'])
            if not tms:
                transmembrane_regions_list.append("")
            else:
                transmembrane_regions_list.append(','.join(tms))
            is_localization_marker_list.append(sub.iloc[j]['predicting_gene_is_lm'])

    new_data = pd.DataFrame({'predicted_gene': predicted_gene_list, 'predicting_gene': predicting_gene_list,
                             'predicted_gene_residue': predicted_gene_residue_list,
                             'predicting_gene_residue': predicting_gene_residue_list,
                             'predicted_subcellular_location': predicted_subcellular_location_list,
                             'predicted_topology': predicted_topology_list,
                             'predicting_crosslinks': crosslinks_list,
                             'predicted_by_transmembrane': predicted_by_transmembrane_list,
                             'transmembrane_regions': transmembrane_regions_list,
                             'predicting_gene_is_lm': is_localization_marker_list})

    return new_data

# function update crosslinks in proteins according to transmembrane regions
def update_xlinks_transmembrane(combined_data):
    """
    method updating the information of proteins by taking manual edits
    in the csv and reordering topological and transmembrane domains
    for a protein
    :param combined_data:
    :return: new_data
    """
    gene_helper_list = []

    gene_list = []
    protein_list = []
    subcellular_location_list = []
    topology_list = []
    crosslinks_list = []
    transmembrane_list = []
    is_lm_list = []

    combined_data['transmembrane'] = combined_data['transmembrane'].fillna('')
    combined_data['crosslinks'] = combined_data['crosslinks'].fillna("")
    combined_data['subcellular_location'] = combined_data['subcellular_location'].fillna("")
    combined_data['topology'] = combined_data['topology'].fillna("")

    for i in combined_data.index:


Complete the function implementation replacing "raise NotImplementedError".