code: def test_data_grid_eps(request, mtcars, effect_type, eps):
      model, idata = mtcars
      grid = data_grid(
          model, ["drat", "am"], "hp", effect_type, eps=eps
      )
      unit_difference = np.unique(np.abs(np.diff(grid["hp"])))
  
      id = request.node.name
      if id == "comparisons":
          # centered difference 'eps' of 1 adds and subtracts 1 to the default "hp" value
          assert unit_difference == np.array([2])
      elif id == "slopes":
          # finite difference 'eps' of 1e-2 adds 0.01 to the default "hp" value
          assert unit_difference == np.array([0.01])
  
file_path: bambi/tests/test_interpret.py
imports: import numpy
  import pandas
  import pytest
  import bambi
  from bambi.interpret.helpers import data_grid, select_draws
label_desc: Use image node_id 6 for calling a global function with example usage: test_data_grid_eps(request, mtcars, effect_type, eps) without return types