experiments/mario/gym-super-mario-bros-master/gym_super_mario_bros/_roms/rom_path.py
def rom_path(lost_levels, rom_mode):
    """
    Return the ROM filename for a game and ROM mode.

    Args:
        lost_levels (bool): whether to use the lost levels ROM
        rom_mode (str): the mode of the ROM hack to use as one of:
            - 'vanilla'
            - 'pixel'
            - 'downsample'
            - 'vanilla'

    Returns (str):
        the ROM path based on the input parameters

    """
    # Type and value check the lost levels parameter
    if not isinstance(lost_levels, bool):
        raise TypeError('lost_levels must be of type: bool')
    # try the unwrap the ROM path from the dictionary
    try:
        rom = _ROM_PATHS[lost_levels][rom_mode]
    except KeyError:
        raise ValueError('rom_mode ({}) not supported!'.format(rom_mode))
    # get the absolute path for the ROM
    rom = os.path.join(os.path.dirname(os.path.abspath(__file__)), rom)

    return rom

    Return the ROM filename for a game and ROM mode.

    Args:
        lost_levels (bool): whether to use the lost levels ROM
        rom_mode (str): the mode of the ROM hack to use as one of:
            - 'vanilla'
            - 'pixel'
            - 'downsample'
            - 'vanilla'

    Returns (str):
        the ROM path based on the input parameters

    
Return the ROM filename for a game and ROM mode.
Return the ROM filename for a game and ROM mode .
def rom_path(lost_levels, rom_mode):
    if not isinstance(lost_levels, bool):
        raise TypeError('lost_levels must be of type: bool')
    try:
        rom = _ROM_PATHS[lost_levels][rom_mode]
    except KeyError:
        raise ValueError('rom_mode ({}) not supported!'.format(rom_mode))
    rom = os.path.join(os.path.dirname(os.path.abspath(__file__)), rom)
    return rom
def rom_path ( lost_levels , rom_mode ) : if not isinstance ( lost_levels , bool ) : raise TypeError ( 'lost_levels must be of type: bool' ) try : rom = _ROM_PATHS [ lost_levels ] [ rom_mode ] except KeyError : raise ValueError ( 'rom_mode ({}) not supported!' . format ( rom_mode ) ) rom = os . path . join ( os . path . dirname ( os . path . abspath ( __file__ ) ) , rom ) return rom
Return the ROM filename for a game and ROM mode.
Return the ROM filename for a game and ROM mode .
"""
    Return the ROM filename for a game and ROM mode.

    Args:
        lost_levels (bool): whether to use the lost levels ROM
        rom_mode (str): the mode of the ROM hack to use as one of:
            - 'vanilla'
            - 'pixel'
            - 'downsample'
            - 'vanilla'

    Returns (str):
        the ROM path based on the input parameters

    """ # Type and value check the lost levels parameter # try the unwrap the ROM path from the dictionary # get the absolute path for the ROM
lost_levels
whether to use the lost levels ROM
whether to use the lost levels ROM
rom_mode
the mode of the ROM hack to use as one of:
'vanilla'
'pixel'
'downsample'
'vanilla'
the mode of the ROM hack to use as one of : ' vanilla ' ' pixel ' ' downsample ' ' vanilla '