def METHOD_NAME(x, given, df: pd.DataFrame):
    """conditional probability function over categorical variables
       p(x | given) = p(x, given)/p(given)
    Args:
        x: the column variable of interest given the column 'given'
        given: the variabe to fix constant
        df: dataframe with columns [given, x]
    Returns:
        pd.DataFrame: the conditional probability of x given the column 'given'
    """
    return df.groupby([ given ])[ x ].apply(lambda g : g.value_counts()/len(g))  # noqa type: ignore