code: def test_from_arrays_iterator(idx):
      # GH 18434
      arrays = [
          np.asarray(lev).take(level_codes)
          for lev, level_codes in zip(idx.levels, idx.codes)
      ]
  
      # iterator as input
      result = MultiIndex.from_arrays(iter(arrays), names=idx.names)
      tm.assert_index_equal(result, idx)
  
      # invalid iterator input
      msg = "Input must be a list / sequence of array-likes."
      with pytest.raises(TypeError, match=msg):
          MultiIndex.from_arrays(0)
  
imports: from datetime import date, datetime
  import itertools
  import numpy
  import pytest
  from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike
  import pandas
  from pandas import Index, MultiIndex, Series, Timestamp, date_range
  import pandas._testing
label_desc: Use image node_id 8 for calling a global function with example usage: test_from_arrays_iterator(idx) without return types