code: def test_slice():
      FN = FeatureNames
      assert FN(["one", "two", "three"])[1:] == ["two", "three"]
      assert FN(["one", "two", "three"])[:-2] == ["one"]
      assert FN(["one", "two", "three"])[1:] == ["two", "three"]
      assert FN({1: "one"}, n_features=3, unkn_template="x%d")[:] == [
          "x0",
          "one",
          "x2",
      ]
      assert FN(
          {1: "one"},
          n_features=3,
          unkn_template="x%d",
          bias_name="bias",
      )[-3:] == ["one", "x2", "bias"]
      assert FN(["one", "two", "three"], bias_name="bias")[-1:] == [
          "bias"
      ]
      assert FN(np.array(["one", "two", "three"]), bias_name="bias")[
          -1:
      ] == ["bias"]
      assert FN(np.array(["one", "two", "three"]), bias_name="bias")[
          -2:
      ] == ["three", "bias"]
      assert list(FN(np.array(["one", "two", "three"]))[-2:]) == [
          "two",
          "three",
      ]
  
file_path: eli5/tests/test_feature_names.py
imports: import pytest
  import numpy
  from eli5._feature_names import FeatureNames
label_desc: Use image node_id 4 for calling a global function with example usage: test_slice() without return types