class_docstr: Perform a database (SQL) merge operation between two DataFrame objects
  using either columns as keys or their row indexes
class_docstr_tok: ["Perform","a","database","(","SQL",")","merge","operation","between","two","DataFrame","objects","using","either","columns","as","keys","or","their","row","indexes"]
docstr: Restore index levels specified as `on` parameters
  
  Here we check for cases where `self.left_on` and `self.right_on` pairs
  each reference an index level in their respective DataFrames. The
  joined columns corresponding to these pairs are then restored to the
  index of `result`.
  
  **Note:** This method has side effects. It modifies `result` in-place
  
  Parameters
  ----------
  result: DataFrame
      merge result
  
  Returns
  -------
  None
code: def _maybe_restore_index_levels(self, result):
      """
      Restore index levels specified as `on` parameters
  
      Here we check for cases where `self.left_on` and `self.right_on` pairs
      each reference an index level in their respective DataFrames. The
      joined columns corresponding to these pairs are then restored to the
      index of `result`.
  
      **Note:** This method has side effects. It modifies `result` in-place
  
      Parameters
      ----------
      result: DataFrame
          merge result
  
      Returns
      -------
      None
      """
      names_to_restore = []
      for name, left_key, right_key in zip(
          self.join_names, self.left_on, self.right_on
      ):
          if (
              self.orig_left._is_level_reference(left_key)
              and self.orig_right._is_level_reference(right_key)
              and name not in result.index.names
          ):
              names_to_restore.append(name)
  
      if names_to_restore:
          result.set_index(names_to_restore, inplace=True)
  
imports: import copy
  import string
  import warnings
  import numpy
  from pandas._libs import hashtable, join, lib
  import pandas.compat
  from pandas.compat import filter, lzip, map, range, zip
  from pandas.errors import MergeError
  from pandas.util._decorators import Appender, Substitution
  from pandas.core.dtypes.common import ensure_float64, ensure_int64, ensure_object, is_array_like, is_bool, is_bool_dtype, is_categorical_dtype, is_datetime64_dtype, is_datetime64tz_dtype, is_datetimelike, is_dtype_equal, is_extension_array_dtype, is_float_dtype, is_int64_dtype, is_integer, is_integer_dtype, is_list_like, is_number, is_numeric_dtype, is_object_dtype, needs_i8_conversion
  from pandas.core.dtypes.missing import isnull, na_value_for_dtype
  from pandas import Categorical, DataFrame, Index, MultiIndex, Series, Timedelta
  import pandas.core.algorithms
  from pandas.core.arrays.categorical import _recode_for_categories
  import pandas.core.common
  from pandas.core.frame import _merge_doc
  from pandas.core.internals import concatenate_block_managers, items_overlap_with_suffix
  import pandas.core.sorting
  from pandas.core.sorting import is_int64_overflow_possible
label_desc: Use image node_id 5 for calling the _MergeOperation obj's underlying member method code with example usage: obj._maybe_restore_index_levels(result) without return types