code: def test_numby_commands_dollar(client):
      # Test NUMINCRBY
      client.json().set(
          "doc1",
          "$",
          {"a": "b", "b": [{"a": 2}, {"a": 5.0}, {"a": "c"}]},
      )
      # Test multi
      assert client.json().numincrby("doc1", "$..a", 2) == [
          None,
          4,
          7.0,
          None,
      ]
  
      assert client.json().numincrby("doc1", "$..a", 2.5) == [
          None,
          6.5,
          9.5,
          None,
      ]
      # Test single
      assert client.json().numincrby("doc1", "$.b[1].a", 2) == [11.5]
  
      assert client.json().numincrby("doc1", "$.b[2].a", 2) == [None]
      assert client.json().numincrby("doc1", "$.b[1].a", 3.5) == [15.0]
  
      # Test NUMMULTBY
      client.json().set(
          "doc1",
          "$",
          {"a": "b", "b": [{"a": 2}, {"a": 5.0}, {"a": "c"}]},
      )
  
      # test list
      with pytest.deprecated_call():
          assert client.json().nummultby("doc1", "$..a", 2) == [
              None,
              4,
              10,
              None,
          ]
          assert client.json().nummultby("doc1", "$..a", 2.5) == [
              None,
              10.0,
              25.0,
              None,
          ]
  
      # Test single
      with pytest.deprecated_call():
          assert client.json().nummultby("doc1", "$.b[1].a", 2) == [
              50.0
          ]
          assert client.json().nummultby("doc1", "$.b[2].a", 2) == [
              None
          ]
          assert client.json().nummultby("doc1", "$.b[1].a", 3) == [
              150.0
          ]
  
      # test missing keys
      with pytest.raises(exceptions.ResponseError):
          client.json().numincrby("non_existing_doc", "$..a", 2)
          client.json().nummultby("non_existing_doc", "$..a", 2)
  
      # Test legacy NUMINCRBY
      client.json().set(
          "doc1",
          "$",
          {"a": "b", "b": [{"a": 2}, {"a": 5.0}, {"a": "c"}]},
      )
      client.json().numincrby("doc1", ".b[0].a", 3) == 5
  
      # Test legacy NUMMULTBY
      client.json().set(
          "doc1",
          "$",
          {"a": "b", "b": [{"a": 2}, {"a": 5.0}, {"a": "c"}]},
      )
  
      with pytest.deprecated_call():
          client.json().nummultby("doc1", ".b[0].a", 3) == 6
  
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 31 for calling a global function with example usage: test_numby_commands_dollar(client) without return types