code: def test_cap_alpha_invalid():
      alpha = np.zeros((1, 1))
      # alpha must be a float or int
      with pytest.raises(TypeError):
          _cap_alpha(alpha, "0.5")
      # alpha must be between 0 and 1
      with pytest.raises(ValueError):
          _cap_alpha(alpha, 1.1)
      with pytest.raises(ValueError):
          _cap_alpha(alpha, -0.1)
  
imports: import pytest
  import numpy
  from eli5.base import Explanation, TargetExplanation
  from eli5.formatters.image import format_as_image, heatmap_to_image, expand_heatmap, _validate_heatmap, _update_alpha, _cap_alpha, _overlay_heatmap
  from .utils_image import assert_pixel_by_pixel_equal
label_desc: Use image node_id 14 for calling a global function with example usage: test_cap_alpha_invalid() without return types