class_docstr: To run: "python -m saliency.core.xrai_test" from the top-level directory.
class_docstr_tok: ["To","run",":","``","python","-m","saliency.core.xrai_test","''","from","the","top-level","directory","."]
code: def testXraiGetMaskFullFlat(self):
      # Calculate XRAI attribution using GetMaskWithDetails(...) method.
      xrai_params = XRAIParameters(
          return_xrai_segments=True,
          flatten_xrai_segments=True,
          algorithm="full",
          area_threshold=1.0,
          return_ig_attributions=True,
      )
      xrai_out = self.xrai.GetMaskWithDetails(
          x_value=self.input_image,
          call_model_function=self.call_model_function,
          extra_parameters=xrai_params,
      )
  
      # Verify the result.
      self._assert_xrai_correctness(xrai_out, is_flatten_segments=True)
  
      # Calculate XRAI attribution using GetMask(...) method.
      heatmap = self.xrai.GetMask(
          x_value=self.input_image,
          call_model_function=self.call_model_function,
          extra_parameters=xrai_params,
      )
  
      # Verify that the heatmaps returned by GetMaskWithDetails(...) and
      # GetMaskWithDetails(...) are the same.
      self.assertTrue(
          np.array_equal(xrai_out.attribution_mask, heatmap)
      )
  
imports: import unittest
  import unittest.mock
  import numpy
  import skimage.draw
  from .None import xrai
  from .xrai import XRAI
  from .xrai import XRAIParameters
label_desc: Use image node_id 3 for calling the XraiTest obj's underlying member method code with example usage: obj.testXraiGetMaskFullFlat() without return types