docstr: Test that we get the expected result if renaming kw2 to kw3.
docstr_tok: ["Test","that","we","get","the","expected","result","if","renaming","kw2","to","kw3","."]
code: def testKeywordRename(self):
      """Test that we get the expected result if renaming kw2 to kw3."""
      text = "f(a, b, kw1=c, kw2=d)\n"
      expected = "f(a, b, kw1=c, kw3=d)\n"
      (_, report, _), new_text = self._upgrade(
          RenameKeywordSpec(), text
      )
      self.assertEqual(new_text, expected)
      self.assertNotIn("Manual check required", report)
  
      # No keywords specified, no reordering, so we should get input as output
      text = "f(a, b, c, d)\n"
      (_, report, _), new_text = self._upgrade(
          RenameKeywordSpec(), text
      )
      self.assertEqual(new_text, text)
      self.assertNotIn("Manual check required", report)
  
      # Positional *args passed in that we cannot inspect, should warn
      text = "f(a, *args)\n"
      (_, report, _), _ = self._upgrade(RenameKeywordSpec(), text)
      self.assertNotIn("Manual check required", report)
  
      # **kwargs passed in that we cannot inspect, should warn
      text = "f(a, b, kw1=c, **kwargs)\n"
      (_, report, _), _ = self._upgrade(RenameKeywordSpec(), text)
      self.assertIn("Manual check required", report)
  
imports: import ast
  import io
  import os
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import test
  from tensorflow.tools.compatibility import ast_edits
label_desc: Use image node_id 4 for calling the TestAstEdits obj's underlying member method code with example usage: obj.testKeywordRename() without return types