code: def test_basic(self) -> None:
      torch.manual_seed(0)
  
      D = 3
      B = 3
      DI = 2
      keys = ["f1", "f2"]
      F = len(keys)
      dense_features = torch.rand((B, D))
  
      embeddings = KeyedTensor(
          keys=keys,
          length_per_key=[D] * F,
          values=torch.rand((B, D * F)),
      )
      inter_arch = FMInteractionArch(
          fm_in_features=D + D * F,
          sparse_feature_names=keys,
          deep_fm_dimension=DI,
      )
      inter_output = inter_arch(dense_features, embeddings)
      self.assertEqual(inter_output.size(), (B, D + DI + 1))
  
      # check output forward numerical accuracy
      expected_output = torch.Tensor(
          [
              [0.4963, 0.7682, 0.0885, 0.0000, 0.2646, 4.3660],
              [0.1320, 0.3074, 0.6341, 0.0000, 0.0834, 7.6417],
              [0.4901, 0.8964, 0.4556, 0.0000, 0.0671, 15.5230],
          ],
      )
      self.assertTrue(
          torch.allclose(
              inter_output,
              expected_output,
              rtol=1e-4,
              atol=1e-4,
          )
      )
  
      # check tracer compatibility
      gm = torch.fx.GraphModule(inter_arch, Tracer().trace(inter_arch))
      torch.jit.script(gm)
  
file_path: torchrec/torchrec/models/tests/test_deepfm.py
imports: import unittest
  import torch
  from torch.testing import FileCheck
  from torchrec.fx import symbolic_trace, Tracer
  from torchrec.models.deepfm import DenseArch, FMInteractionArch, SimpleDeepFMNN
  from torchrec.modules.embedding_configs import EmbeddingBagConfig
  from torchrec.modules.embedding_modules import EmbeddingBagCollection
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor, KeyedTensor
label_desc: Use image node_id 1 for calling the FMInteractionArchTest obj's underlying member method code with example usage: obj.test_basic() without return types