input: Write a function to simulate an interactive text-based RPG game in Python where the player can move around in an environment and battle monsters. The function should initialize the player, rooms, and monsters, and handle actions such as moving between rooms and fighting monsters. If the player's health reaches zero, the game should end.
  def start_game():
   # Create player, rooms and monsters
   player = Player()
  
  # Main game loop
  while True:
   # Show the current room;
   print(f'You are in {player.location}.')
   # Display available actions
   print('Available actions: move, fight')
   # Get user's action
   response = input('What would you like to do? ').lower()
  
   # Moving to a new room
   if response == 'move':
   # Get the list of available rooms
   # Get the user's destination
   # Move the player to the chosen room
  
  # Fighting a monster
   if response == 'fight':
   # Get all monsters in the current room
   # Get the user's chosen monster
   # Initiate a battle between the player and the monster
  
  # End of the game
   if player.health <= 0:
   print ('You have been defeated!')
   break
  
  if __name__ == '__main__':
   start_game()
  
  assert start_game()  # This should simulate the game interaction in the testing environment.
output: def start_game():
      player = Player()
      rooms = [Room("Room1", [Monster("Goblin", 10, 5)]), Room("Room2", [Monster("Orc", 20, 10)]), Room("Room3", [])]
      player.location = rooms[0]
  
      while True:
          print(f'You are in {player.location.name}.')
          print('Available actions: move, fight')
          response = input('What would you like to do? ').lower()
  
          if response == 'move':
              available_rooms = [room for room in rooms if room != player.location]
              print('Available rooms:')
              for i, room in enumerate(available_rooms):
                  print(f'{i + 1}. {room.name}')
              choice = int(input('Choose a room to move to: ')) - 1
              player.location = available_rooms[choice]
  
          if response == 'fight':
              monsters = player.location.monsters
              if not monsters:
                  print('No monsters in this room.')
                  continue
              print('Monsters in this room:')
              for i, monster in enumerate(monsters):
                  print(f'{i + 1}. {monster.name}')
              choice = int(input('Choose a monster to fight: ')) - 1
              monster = monsters[choice]
              while player.health > 0 and monster.health > 0:
                  player.attack(monster)
                  if monster.health > 0:
                      monster.attack(player)
              if player.health <= 0:
                  print('You have been defeated!')
                  break
              else:
                  print(f'You defeated the {monster.name}!')
                  player.location.monsters.remove(monster)
  
          if player.health <= 0:
              print('You have been defeated!')
              break