code: def testFromImport(self):
      # foo should be renamed to bar.
      text = "from foo import a"
      expected_text = "from bar import a"
      _, new_text = self._upgrade(RenameImports(), text)
      self.assertEqual(expected_text, new_text)
  
      text = "from foo.a import b"
      expected_text = "from bar.a import b"
      _, new_text = self._upgrade(RenameImports(), text)
      self.assertEqual(expected_text, new_text)
  
      text = "from foo import *"
      expected_text = "from bar import *"
      _, new_text = self._upgrade(RenameImports(), text)
      self.assertEqual(expected_text, new_text)
  
      text = "from foo import a, b"
      expected_text = "from bar import a, b"
      _, new_text = self._upgrade(RenameImports(), text)
      self.assertEqual(expected_text, new_text)
  
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 15 for calling the TestAstEdits obj's underlying member method code with example usage: obj.testFromImport() without return types