'''
**************************************
Helper functions to convert object to ID and vice versa

**************************************
'''
def user_to_index(users_to_index,user):
    return users_to_index[user]

def index_to_user(index_to_users,index):
    return index_to_users[index]

def subreddit_to_index(subreddits_to_index,subreddit):
    return subreddits_to_index[subreddit]

def index_to_subreddit(index_to_subreddits,index):
    return index_to_subreddits[index]