code: def _prod_multiindex(ix1, ix2):
      rows = []
  
      def add_rows(rows, ix):
          if isinstance(ix, pd.MultiIndex):
              ix = ix.to_frame()
              rows += [ix[col] for col in ix.columns]
          else:
              rows += [ix]
          return rows
  
      rows = add_rows(rows, ix1)
      rows = add_rows(rows, ix2)
      res = pd.MultiIndex.from_product(rows)
      res.names = [None] * len(res.names)
      return res
  
imports: from warnings import warn
  import numpy
  import pandas
  from sktime.base import BaseObject
  from sktime.utils.pandas import df_map
  from sktime.utils.validation._dependencies import _check_estimator_deps
label_desc: Use image node_id 1 for calling a global function with example usage: _prod_multiindex(ix1, ix2) and returns: res, rows