code: def _assert_steps_and_alphas(
      self,
      n: int,
      expected_step_sizes: List[float],
      expected_step_sizes_trapezoid: List[float],
      expected_left: List[float],
      expected_right: List[float],
      expected_middle: List[float],
      expected_trapezoid: List[float],
  ) -> None:
      step_sizes_left, alphas_left = riemann_builders(Riemann.left)
      step_sizes_right, alphas_right = riemann_builders(Riemann.right)
      step_sizes_middle, alphas_middle = riemann_builders(
          Riemann.middle
      )
      step_sizes_trapezoid, alphas_trapezoid = riemann_builders(
          Riemann.trapezoid
      )
      assertTensorAlmostEqual(
          self,
          torch.tensor(expected_step_sizes),
          step_sizes_left(n),
          delta=0.05,
          mode="max",
      )
      assertTensorAlmostEqual(
          self,
          torch.tensor(expected_step_sizes),
          step_sizes_right(n),
          delta=0.05,
          mode="max",
      )
      assertTensorAlmostEqual(
          self,
          torch.tensor(expected_step_sizes),
          step_sizes_middle(n),
          delta=0.05,
          mode="max",
      )
      assertTensorAlmostEqual(
          self,
          torch.tensor(expected_step_sizes_trapezoid),
          step_sizes_trapezoid(n),
          delta=0.05,
          mode="max",
      )
      assertTensorAlmostEqual(
          self,
          torch.tensor(expected_left),
          alphas_left(n),
          delta=0.05,
          mode="max",
      )
      assertTensorAlmostEqual(
          self,
          torch.tensor(expected_right),
          alphas_right(n),
          delta=0.05,
          mode="max",
      )
      assertTensorAlmostEqual(
          self,
          torch.tensor(expected_middle),
          alphas_middle(n),
          delta=0.05,
          mode="max",
      )
      assertTensorAlmostEqual(
          self,
          torch.tensor(expected_trapezoid),
          alphas_trapezoid(n),
          delta=0.05,
          mode="max",
      )
  
file_path: captum/tests/attr/test_approximation_methods.py
imports: import unittest
  from typing import List
  import torch
  from captum.attr._utils.approximation_methods import Riemann, riemann_builders
  from tests.helpers.basic import assertTensorAlmostEqual
label_desc: Use image node_id 6 for calling the Test obj's underlying member method code with example usage: obj._assert_steps_and_alphas(n, expected_step_sizes, expected_step_sizes_trapezoid, expected_left, expected_right, expected_middle, expected_trapezoid) without return types