import random


def e2e_slot_to_video_game_slot(slot):
    """Map an E2E slot onto a slot in the Video Game domain. If there are multiple tokens in the corresponding category
    in the Video Game domain, randomly pick one from that category.
    """

    slot_map = {
        'food': ['releaseyear', 'expreleasedate'],      # delexed
        'customerrating': ['rating', 'esrb'],
        'pricerange': ['playerperspective'],
        'familyfriendly': ['hasmultiplayer', 'availableonsteam', 'haslinuxrelease', 'hasmacrelease'],   # boolean
        'area': ['platforms'],
        'eattype': ['genres'],
        'near': ['developer']       # delexed
    }

    if slot in slot_map:
        if len(slot_map[slot]) == 1:
            return slot_map[slot][0]
        else:
            return random.choice(slot_map[slot])
    else:
        return slot