code: def test_parse_slice_disallow_step():
      # Permit steps of 1
      assert parse_slice("1:5", False) == slice(1, 5)
      assert parse_slice("1:5:", False) == slice(1, 5)
      assert parse_slice("1:5:1", False) == slice(1, 5, 1)
      # Disable other steps
      with pytest.raises(ValueError):
          parse_slice("1:5:-1", False)
      with pytest.raises(ValueError):
          parse_slice("1:5:-2", False)
  
file_path: nibabel/nibabel/cmdline/tests/test_roi.py
imports: import os
  import unittest
  from unittest import mock
  import numpy
  import pytest
  import nibabel
  from nibabel.cmdline.roi import lossless_slice, main, parse_slice
  from nibabel.testing import data_path
label_desc: Use image node_id 2 for calling a global function with example usage: test_parse_slice_disallow_step() without return types