class_docstr: Tests Open Device Registration with C++ extensions.
      
class_docstr_tok: ["Tests","Open","Device","Registration","with","C++","extensions","."]
code: def tearDown(self):
      super().tearDown()
      # return the working directory (see setUp)
      os.chdir(self.old_working_dir)
  
imports: import os
  import shutil
  import sys
  from typing import Union
  import tempfile
  import unittest
  import torch.testing._internal.common_utils
  from torch.testing._internal.common_utils import IS_ARM64, TEST_CUDA
  import torch
  import torch.utils.cpp_extension
  from torch.utils.cpp_extension import CUDA_HOME, ROCM_HOME
label_desc: Use image node_id 2 for calling the TestCppExtensionOpenRgistration obj's underlying member method code with example usage: obj.tearDown() without return types