def get_following(user_id, users_collection):
    """ Gets list of users the given user is following """
    query = {'id': user_id}

    user = users_collection.find_one(query)
    if 'following_ids' in user:
        return user['following_ids']
    elif 'following' in user:
        return user['following']

    # No following data; return empty list
    return []