def overlap(x):
    """Function to define the overlap between two lists contained in a pandas dataframe
    1) return the length of the drug shared list

    Parameters
    ----------
    x : Dataframe
        Dataframe containing the drug list related to the side effect and the drug list related to the target
    """

    return len(x['se_drug'].intersection(x['tg_drug']))