def __init__(self, rom_path):
<EOL>rom = ROM(rom_path)<EOL>if rom.prg_rom_size == <NUM_LIT:0>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if rom.has_trainer:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>_ = rom.prg_rom<EOL>_ = rom.chr_rom<EOL>if rom.is_pal:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>elif rom.mapper not in {<NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:2>, <NUM_LIT:3>}:<EOL><INDENT>msg = '<STR_LIT>'<EOL>raise ValueError(msg.format(rom.mapper))<EOL><DEDENT>self.np_random = np.random.RandomState()<EOL>self._rom_path = rom_path<EOL>self._env = _LIB.Initialize(self._rom_path)<EOL>self.viewer = None<EOL>self._has_backup = False<EOL>self.done = True<EOL>self.controllers = [self._controller_buffer(port) for port in range(<NUM_LIT:2>)]<EOL>self.screen = self._screen_buffer()<EOL>self.ram = self._ram_buffer()<EOL>
Create a new NES environment.

Args:
    rom_path (str): the path to the ROM for the environment

Returns:
    None