# Path: indra/sources/ubibrowser/processor.py
# class UbiBrowserProcessor:
#     """Processor for UbiBrowser data."""
#     def __init__(self, e3_df, dub_df):
#         self.e3_df = e3_df
#         self.dub_df = dub_df
#         self.statements = []
# 
#     def extract_statements(self):
#         for df, stmt_type in [(self.e3_df, Ubiquitination),
#                               (self.dub_df, Deubiquitination)]:
#             for _, row in df.iterrows():
#                 stmt = self._process_row(row, stmt_type)
#                 if stmt:
#                     self.statements.append(stmt)
# 
#     @staticmethod
#     def _process_row(row, stmt_type):
#         # Note that even in the DUB table the subject of the statement
#         # is called "E3"
#         # There are some examples where a complex is implied (e.g., BMI1-RNF2),
#         # for simplicity we just ignore these
#         if '-' in row['E3AC']:
#             return None
#         subj_agent = get_standard_agent(row['E3GENE'], {'UP': row['E3AC']})
#         obj_agent = get_standard_agent(row['SUBGENE'], {'UP': row['SUBAC']})
#         if row['SOURCE'] == 'MEDLINE' and row['SOURCEID'] != 'UNIPROT':
#             # Note: we sometimes get int here
#             pmid = str(row['SOURCEID'])
#             text = row['SENTENCE']
#         else:
#             pmid = None
#             text = None
#         ev = Evidence(source_api='ubibrowser', pmid=pmid, text=text)
#         stmt = stmt_type(subj_agent, obj_agent, evidence=[ev])
#         return stmt


import pandas
from .processor import UbiBrowserProcessor
        An UbiBrowserProcessor object with INDRA Statements
        extracted in its statements attribute.
    """
    e3_df = pandas.read_csv(E3_URL, sep='\t')
    dub_df = pandas.read_csv(DUB_URL, sep='\t')
    return process_df(e3_df, dub_df)


def process_file(e3_path: str, dub_path: str) -> UbiBrowserProcessor:
    """Process UbiBrowser data from files.

    Parameters
    ----------
    e3_path :
        The path to the E3 file.
    dub_path :
        The path to the DUB file.

    Returns
    -------
    :
        An UbiBrowserProcessor object with INDRA Statements
        extracted in its statements attribute.
    """
    e3_df = pandas.read_csv(e3_path, sep='\t')
    dub_df = pandas.read_csv(dub_path, sep='\t')
    return process_df(e3_df, dub_df)


def process_df(e3_df: pandas.DataFrame, dub_df: pandas.DataFrame) \

# Path: indra/sources/ubibrowser/processor.py
# class UbiBrowserProcessor:
#     """Processor for UbiBrowser data."""
#     def __init__(self, e3_df, dub_df):
#         self.e3_df = e3_df
#         self.dub_df = dub_df
#         self.statements = []
# 
#     def extract_statements(self):
#         for df, stmt_type in [(self.e3_df, Ubiquitination),
#                               (self.dub_df, Deubiquitination)]:
#             for _, row in df.iterrows():
#                 stmt = self._process_row(row, stmt_type)
#                 if stmt:
#                     self.statements.append(stmt)
# 
#     @staticmethod
#     def _process_row(row, stmt_type):
#         # Note that even in the DUB table the subject of the statement
#         # is called "E3"
#         # There are some examples where a complex is implied (e.g., BMI1-RNF2),
#         # for simplicity we just ignore these
#         if '-' in row['E3AC']:
#             return None
#         subj_agent = get_standard_agent(row['E3GENE'], {'UP': row['E3AC']})
#         obj_agent = get_standard_agent(row['SUBGENE'], {'UP': row['SUBAC']})
#         if row['SOURCE'] == 'MEDLINE' and row['SOURCEID'] != 'UNIPROT':
#             # Note: we sometimes get int here
#             pmid = str(row['SOURCEID'])
#             text = row['SENTENCE']
#         else:
#             pmid = None
#             text = None
#         ev = Evidence(source_api='ubibrowser', pmid=pmid, text=text)
#         stmt = stmt_type(subj_agent, obj_agent, evidence=[ev])
#         return stmt


# Path: indra/sources/ubibrowser/api.py
import pandas
from .processor import UbiBrowserProcessor

        An UbiBrowserProcessor object with INDRA Statements
        extracted in its statements attribute.
    """
    e3_df = pandas.read_csv(E3_URL, sep='\t')
    dub_df = pandas.read_csv(DUB_URL, sep='\t')
    return process_df(e3_df, dub_df)


def process_file(e3_path: str, dub_path: str) -> UbiBrowserProcessor:
    """Process UbiBrowser data from files.

    Parameters
    ----------
    e3_path :
        The path to the E3 file.
    dub_path :
        The path to the DUB file.

    Returns
    -------
    :
        An UbiBrowserProcessor object with INDRA Statements
        extracted in its statements attribute.
    """
    e3_df = pandas.read_csv(e3_path, sep='\t')
    dub_df = pandas.read_csv(dub_path, sep='\t')
    return process_df(e3_df, dub_df)


def process_df(e3_df: pandas.DataFrame, dub_df: pandas.DataFrame) \

        -> UbiBrowserProcessor: