code: def test_from_arrays(idx):
      arrays = [
          np.asarray(lev).take(level_codes)
          for lev, level_codes in zip(idx.levels, idx.codes)
      ]
  
      # list of arrays as input
      result = MultiIndex.from_arrays(arrays, names=idx.names)
      tm.assert_index_equal(result, idx)
  
      # infer correctly
      result = MultiIndex.from_arrays(
          [[pd.NaT, Timestamp("20130101")], ["a", "b"]]
      )
      assert result.levels[0].equals(Index([Timestamp("20130101")]))
      assert result.levels[1].equals(Index(["a", "b"]))
  
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 7 for calling a global function with example usage: test_from_arrays(idx) without return types