def calculatePossessions(reg_season_games):
    """Adds a column for Tm and Opp number of possessions to provided dataframe
    Uses Basketball Reference method:
    https://www.basketball-reference.com/about/glossary.html
    Note TmPoss == OppPoss

    Arguments:
        reg_season_games {DataFrame} -- Games to calculate possessions

    Returns:
        DataFrame -- Input DataFrame + TmPoss and OppPoss
    """
    reg_season_games['TmPoss'] = (
            0.5 * ((reg_season_games['TmFGA']
                    + 0.4 * reg_season_games['TmFTA']
                    - 1.07 * (reg_season_games['TmORB'] /
                              (reg_season_games['TmORB']
                               + reg_season_games['OppDRB']))
                    * (reg_season_games['TmFGA']
                       - reg_season_games['TmFGM'])
                    + reg_season_games['TmTO'])
                   + (reg_season_games['OppFGA']
                      + 0.4 * reg_season_games['OppFTA']
                      - 1.07 * (reg_season_games['OppORB'] /
                                (reg_season_games['OppORB']
                                 + reg_season_games['TmDRB']))
                      * (reg_season_games['OppFGA']
                         - reg_season_games['OppFGM'])
                      + reg_season_games['OppTO'])))

    reg_season_games['OppPoss'] = reg_season_games['TmPoss']
    return reg_season_games