code: def bruteforce_inference(self, X, w, b, use_diag):
      assert len(w) <= 4
      ans = X.dot(w[0]).flatten() + b
      if len(w) > 1:
          ans += self.bruteforce_inference_one_interaction(
              X, w, 2, use_diag
          )
      if len(w) > 2:
          ans += self.bruteforce_inference_one_interaction(
              X, w, 3, use_diag
          )
      if len(w) > 3:
          ans += self.bruteforce_inference_one_interaction(
              X, w, 4, use_diag
          )
      return ans
  
file_path: tffm/test.py
imports: import unittest
  import numpy
  from tffm import TFFMClassifier
  from scipy import sparse
  import tensorflow
  import pickle
label_desc: Use image node_id 8 for calling the TestFM obj's underlying member method code with example usage: obj.bruteforce_inference(X, w, b, use_diag) and returns: ans