code: def testUpgradeInPlaceWithSymlinkInDifferentDir(self):
      if os.name == "nt":
          self.skipTest("os.symlink doesn't work uniformly on Windows.")
  
      upgrade_dir = os.path.join(self.get_temp_dir(), "foo")
      other_dir = os.path.join(self.get_temp_dir(), "bar")
      os.mkdir(upgrade_dir)
      os.mkdir(other_dir)
      file_c = os.path.join(other_dir, "c.py")
      file_d = os.path.join(upgrade_dir, "d.py")
  
      with open(file_c, "a") as f:
          f.write("import foo as f")
      os.symlink(file_c, file_d)
  
      upgrader = ast_edits.ASTCodeUpgrader(RenameImports())
      upgrader.process_tree_inplace(upgrade_dir)
  
      self.assertTrue(os.path.islink(file_d))
      self.assertEqual(file_c, os.readlink(file_d))
      # File pointed to by symlink is in a different directory.
      # Therefore, it should not be upgraded.
      with open(file_c, "r") as f:
          self.assertEqual("import foo as f", f.read())
  
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 22 for calling the TestAstEdits obj's underlying member method code with example usage: obj.testUpgradeInPlaceWithSymlinkInDifferentDir() without return types