code: def test_from_frame_dtype_fidelity():
      # GH 22420
      df = pd.DataFrame(
          {
              "dates": date_range(
                  "19910905", periods=6, tz="US/Eastern"
              ),
              "a": [1, 1, 1, 2, 2, 2],
              "b": pd.Categorical(
                  ["a", "a", "b", "b", "c", "c"], ordered=True
              ),
              "c": ["x", "x", "y", "z", "x", "y"],
          }
      )
      original_dtypes = df.dtypes.to_dict()
  
      expected_mi = MultiIndex.from_arrays(
          [
              date_range("19910905", periods=6, tz="US/Eastern"),
              [1, 1, 1, 2, 2, 2],
              pd.Categorical(
                  ["a", "a", "b", "b", "c", "c"], ordered=True
              ),
              ["x", "x", "y", "z", "x", "y"],
          ],
          names=["dates", "a", "b", "c"],
      )
      mi = MultiIndex.from_frame(df)
      mi_dtypes = {
          name: mi.levels[i].dtype for i, name in enumerate(mi.names)
      }
  
      tm.assert_index_equal(expected_mi, mi)
      assert original_dtypes == mi_dtypes
  
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 40 for calling a global function with example usage: test_from_frame_dtype_fidelity() without return types