code: def test_series(df):
      """Test expand_grid output for Series input."""
      A = df["a"]
      B = df["cities"]
      others = {"A": A, "B": B}
      result = expand_grid(others=others)
      A = df.loc[:, ["a"]]
      B = df.loc[:, ["cities"]]
      expected = A.assign(key=1).merge(B.assign(key=1), on="key")
      expected = expected.drop(columns="key")
      expected.columns = pd.MultiIndex.from_arrays(
          [["A", "B"], expected.columns]
      )
      assert_frame_equal(result, expected)
  
imports: from functools import reduce
  import numpy
  import pandas
  import pytest
  from hypothesis import given, settings
  from pandas.testing import assert_frame_equal
  import janitor
  from janitor.functions.expand_grid import expand_grid
  from janitor.testing_utils.strategies import categoricaldf_strategy, df_strategy
label_desc: Use image node_id 11 for calling a global function with example usage: test_series(df) without return types