code: def test_versioned_div_tensor_out(self, sample_input):
      def historic_div_out(self, other, out):
          if (
              self.is_floating_point()
              or other.is_floating_point()
              or out.is_floating_point()
          ):
              return torch.true_divide(self, other, out=out)
          return torch.divide(
              self, other, out=out, rounding_mode="trunc"
          )
  
      class MyModule(torch.nn.Module):
          def forward(self, a, b, out):
              return a.div(b, out=out)
  
      try:
          v3_mobile_module = _load_for_lite_interpreter(
              pytorch_test_dir
              + "/cpp/jit/upgrader_models/test_versioned_div_tensor_out_v2.ptl"
          )
      except Exception as e:
          self.skipTest("Failed to load fixture!")
  
      current_mobile_module = self._save_load_mobile_module(MyModule)
  
      for val_a, val_b in product(sample_input, sample_input):
          a = torch.tensor((val_a,))
          b = torch.tensor((val_b,))
  
          for out in (
              torch.empty((1,)),
              torch.empty((1,), dtype=torch.long),
          ):
  
              def _helper(m, fn):
                  fn_result = None
                  if fn is torch.div:
                      fn_result = self._try_fn(
                          fn, a, b, out=out.clone()
                      )
                  else:
                      fn_result = self._try_fn(fn, a, b, out.clone())
                  m_result = self._try_fn(m, a, b, out)
  
                  if isinstance(m_result, Exception):
                      self.assertTrue(fn_result, Exception)
                  else:
                      self.assertEqual(m_result, fn_result)
                      self.assertEqual(m_result, out)
  
              _helper(v3_mobile_module, historic_div_out)
              _helper(current_mobile_module, torch.div)
  
imports: from itertools import product
  import io
  import os
  import sys
  import hypothesis.strategies
  from hypothesis import example, settings, given
  from typing import Union
  import torch
  from torch.testing._internal.jit_utils import JitTestCase
  from torch.jit.mobile import _load_for_lite_interpreter
label_desc: Use image node_id 8 for calling the TestSaveLoadForOpVersion obj's underlying member method code with example usage: obj.test_versioned_div_tensor_out(sample_input) and returns: torch, torch, a