code: def test_input_arrays(ford_2012):
      mama = abstract.Function("MAMA")
  
      # test default setting
      assert mama.get_input_arrays() == {}
  
      # test setting/getting input_arrays
      assert mama.set_input_arrays(ford_2012)
      assert mama.get_input_arrays() == ford_2012
      with pytest.raises(Exception):
          mama.set_input_arrays({"hello": "fail", "world": "bye"})
  
      # test only required keys are needed
      willr = abstract.Function("WILLR")
      reqd = willr.input_names["prices"]
      input_d = dict([(key, ford_2012[key]) for key in reqd])
      assert willr.set_input_arrays(input_d)
      assert willr.input_arrays == input_d
  
      # test extraneous keys are ignored
      input_d["extra_stuffs"] = "you should never see me"
      input_d["date"] = np.random.rand(100)
      assert willr.set_input_arrays(input_d)
  
      # test missing keys get detected
      input_d["open"] = ford_2012["open"]
      input_d.pop("close")
      with pytest.raises(Exception):
          willr.set_input_arrays(input_d)
  
      # test changing input_names on the Function
      willr.input_names = {"prices": ["high", "low", "open"]}
      assert willr.set_input_arrays(input_d)
  
imports: import copy
  import re
  import threading
  import time
  import numpy
  import pytest
  from numpy.testing import assert_array_equal, assert_raises
  import talib
  from talib import abstract, func
label_desc: Use image node_id 10 for calling a global function with example usage: test_input_arrays(ford_2012) without return types