code: def test_from_frame():
      # GH 22420
      df = pd.DataFrame(
          [["a", "a"], ["a", "b"], ["b", "a"], ["b", "b"]],
          columns=["L1", "L2"],
      )
      expected = MultiIndex.from_tuples(
          [("a", "a"), ("a", "b"), ("b", "a"), ("b", "b")],
          names=["L1", "L2"],
      )
      result = MultiIndex.from_frame(df)
      tm.assert_index_equal(expected, result)
  
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 37 for calling a global function with example usage: test_from_frame() without return types