def get_head_tail(df, mode='retweet_count', head_perc=0.95, tail_perc=0.5):
    """
    Given a dataframe `df` return the head and tail of the dataframe according to mode provided.

    Args:
        df (pd.DataFrame): Original dataframe
        mode (Optional[str], optional): Metric to be used to get head/tail. Possible values: `retweet_follower_ratio,
                                        retweets_in_relation_to_average, retweet_count`. Defaults to 'retweet_count'.
        head_perc (Optional[float], optional): Percentile threshold to consider entries in head. Defaults to `0.95`.
        tail_perc (Optional[float], optional): Percentile threshold to consider entries in tail. Defaults to `0.35`.

    Returns:
        Tuple[pd.DataFrame, pd.DataFrame]: head, tail of the dataframe
    """
    top_threshold_retweets = df[mode].quantile(head_perc)
    bot_threshold_retweets = df[mode].quantile(tail_perc)
    idx_top_retweets = df[df[mode] >= top_threshold_retweets].index
    idx_bot_retweets = df[df[mode] <= bot_threshold_retweets].index

    head = df.loc[idx_top_retweets]
    tail = df.loc[idx_bot_retweets]

    return head, tail