code: def test_arrindex(client):
      client.json().set("arr", Path.root_path(), [0, 1, 2, 3, 4])
      assert 1 == client.json().arrindex("arr", Path.root_path(), 1)
      assert -1 == client.json().arrindex("arr", Path.root_path(), 1, 2)
      assert 4 == client.json().arrindex("arr", Path.root_path(), 4)
      assert 4 == client.json().arrindex(
          "arr", Path.root_path(), 4, start=0
      )
      assert 4 == client.json().arrindex(
          "arr", Path.root_path(), 4, start=0, stop=5000
      )
      assert -1 == client.json().arrindex(
          "arr", Path.root_path(), 4, start=0, stop=-1
      )
      assert -1 == client.json().arrindex(
          "arr", Path.root_path(), 4, start=1, stop=3
      )
  
imports: import pytest
  import redis
  from redis import Redis, exceptions
  from redis.commands.json.decoders import decode_list, unstring
  from redis.commands.json.path import Path
  from .conftest import _get_client, assert_resp_response, skip_ifmodversion_lt
label_desc: Use image node_id 19 for calling a global function with example usage: test_arrindex(client) without return types