class_docstr: Test ParlaiParser.
class_docstr_tok: ["Test","ParlaiParser","."]
docstr: Test parse_kwargs when we have options that depend on options.
docstr_tok: ["Test","parse_kwargs","when","we","have","options","that","depend","on","options","."]
code: def test_parse_kwargs_multirounds(self):
      """
      Test parse_kwargs when we have options that depend on options.
      """
      parser = ParlaiParser(True, False)
      opt = parser.parse_kwargs(
          task="integration_tests",
          mutators="episode_shuffle",
          preserve_context=True,
      )
      assert opt["preserve_context"] is True
      opt = parser.parse_kwargs(
          task="integration_tests",
          mutators="episode_shuffle",
          preserve_context=False,
      )
      assert opt["preserve_context"] is False
  
      with self.assertRaises(KeyError):
          parser.parse_kwargs(
              task="integration_tests",
              mutators="episode_shuffle",
              fake_option=False,
          )
  
      with self.assertRaises(KeyError):
          parser.parse_kwargs(
              task="integration_tests", fake_option=False
          )
  
imports: import os
  import json
  import unittest
  from parlai.core.params import ParlaiParser
  import parlai.core.agents
  import parlai.utils.testing
label_desc: Use image node_id 7 for calling the TestParlaiParser obj's underlying member method code with example usage: obj.test_parse_kwargs_multirounds() without return types