code: def test_pointwise_binary(self):
      for op in ["add", "sub", "mul", "div"]:
          with self.subTest(op):
  
              class BinaryModule(torch.nn.Module):
                  def forward(self, lhs, rhs):
                      if op == "add":
                          return lhs + rhs
                      if op == "sub":
                          return lhs - rhs
                      if op == "mul":
                          return lhs * rhs
                      if op == "div":
                          return lhs / rhs
                      raise Exception("Bad op")
  
              self.check(
                  BinaryModule(),
                  [
                      torch.tensor([1.0, 2.0]),
                      torch.tensor([3.0, 4.0]),
                  ],
              )
  
              self.check(
                  BinaryModule(),
                  [
                      torch.tensor([[1.0, 2.0]]),
                      torch.tensor([[3.0, 4.0], [5.0, 6.0]]),
                  ],
              )
  
              with self.assertRaisesRegex(
                  Exception, "Non-equal-rank broadcast"
              ):
                  self.check(
                      BinaryModule(),
                      [
                          torch.tensor([1.0, 2.0]),
                          torch.tensor([[3.0, 4.0], [5.0, 6.0]]),
                      ],
                  )
  
imports: import os
  import ctypes
  import torch
  import unittest
  from typing import Tuple
  from torch.backends._nnapi.prepare import convert_model_to_nnapi
  from torch.testing._internal.common_quantized import supported_qengines
  from torch.testing._internal.common_utils import TestCase, run_tests
label_desc: Use image node_id 15 for calling the TestNNAPI obj's underlying member method code with example usage: obj.test_pointwise_binary() and returns: unknown, unknown, unknown, unknown