code: def _validate_merge_params(
      lhs,
      rhs,
      on,
      left_on,
      right_on,
      left_index,
      right_index,
      how,
      suffixes,
  ):
      # Error for various invalid combinations of merge input parameters
  
      # We must actually support the requested merge type
      if how not in {"left", "inner", "outer", "leftanti", "leftsemi"}:
          raise NotImplementedError(f"{how} merge not supported yet")
  
      if on:
          if left_on or right_on:
              # Passing 'on' with 'left_on' or 'right_on' is ambiguous
              raise ValueError(
                  'Can only pass argument "on" OR "left_on" '
                  'and "right_on", not a combination of both.'
              )
          elif left_index or right_index:
              # Passing 'on' with 'left_index' or 'right_index' is ambiguous
              raise ValueError(
                  'Can only pass argument "on" OR "left_index" '
                  'and "right_index", not a combination of both.'
              )
          else:
              # the validity of 'on' being checked by _Indexer
              return
      elif left_on and left_index:
          raise ValueError(
              'Can only pass argument "left_on" OR "left_index" not both.'
          )
      elif right_on and right_index:
          raise ValueError(
              'Can only pass argument "right_on" OR "right_index" not both.'
          )
  
      # Can't merge on a column name that is present in both a frame and its
      # indexes.
      if on:
          for key in on:
              if (key in lhs._data and key in lhs.index._data) or (
                  key in rhs._data and key in rhs.index._data
              ):
                  raise ValueError(
                      f"{key} is both an index level and a "
                      "column label, which is ambiguous."
                  )
      if left_on:
          for key in left_on:
              if key in lhs._data and key in lhs.index._data:
                  raise ValueError(
                      f"{key} is both an index level and a "
                      "column label, which is ambiguous."
                  )
      if right_on:
          for key in right_on:
              if key in rhs._data and key in rhs.index._data:
                  raise ValueError(
                      f"{key} is both an index level and a "
                      "column label, which is ambiguous."
                  )
  
      # Can't merge on unnamed Series
      if (isinstance(lhs, cudf.Series) and not lhs.name) or (
          isinstance(rhs, cudf.Series) and not rhs.name
      ):
          raise ValueError("Cannot merge on unnamed Series")
  
      # If nothing specified, must have common cols to use implicitly
      same_named_columns = set(lhs._data) & set(rhs._data)
      if (
          not (left_index or right_index)
          and not (left_on or right_on)
          and len(same_named_columns) == 0
      ):
          raise ValueError("No common columns to perform merge on")
  
      lsuffix, rsuffix = suffixes
      for name in same_named_columns:
          if name == left_on == right_on:
              continue
          elif left_on and right_on:
              if (name in left_on and name in right_on) and (
                  left_on.index(name) == right_on.index(name)
              ):
                  continue
          else:
              if not (lsuffix or rsuffix):
                  raise ValueError(
                      "there are overlapping columns but "
                      "lsuffix and rsuffix are not defined"
                  )
  
      if (
          isinstance(lhs, cudf.DataFrame)
          and isinstance(rhs, cudf.DataFrame)
          # An empty column is considered to have 1 level by pandas (can be
          # seen by using lhs.columns.nlevels, but we don't want to use
          # columns internally because it's expensive).
          # TODO: Investigate whether ColumnAccessor.nlevels should be
          # modified in the size 0 case.
          and max(lhs._data.nlevels, 1) != max(rhs._data.nlevels, 1)
      ):
          # Do not remove until pandas 2.0 support is added.
          warnings.warn(
              "merging between different levels is deprecated and will be "
              f"removed in a future version. ({lhs._data.nlevels} levels on "
              f"the left, {rhs._data.nlevels} on the right)",
              FutureWarning,
          )
  
file_path: cudf/python/cudf/cudf/core/join/join.py
imports: from __future__ import annotations
  import itertools
  import warnings
  from typing import Any, ClassVar, List, Optional
  import cudf
  from cudf import _lib
  from cudf._lib.types import size_type_dtype
  from cudf.core.copy_types import GatherMap
  from cudf.core.join._join_helpers import _coerce_to_tuple, _ColumnIndexer, _IndexIndexer, _match_join_keys
label_desc: Use image node_id 6 for calling the Merge obj's underlying member method code with example usage: obj._validate_merge_params(lhs, rhs, on, left_on, right_on, left_index, right_index, how, suffixes) without return types