code: def convert_inputs(X, y, columns=None, index=None, deep=False):
      """
      Unite arraylike `X` and vectorlike `y` into a DataFrame and Series.
  
      If both are pandas types already, raises an error if their indexes do not match.
      If one is pandas, the returns will share that index.
      If neither is pandas, a default index will be used, unless `index` is passed.
  
      Parameters
      ----------
      X: arraylike
      y: listlike
      columns: listlike
          Specifies column names to use for `X`.
          Ignored if `X` is already a dataframe.
          If `None`, use the default pandas column names.
      index: listlike
          The index to use, if neither `X` nor `y` is a pandas type.
          (If one has an index, then this has no effect.)
          If `None`, use the default pandas index.
      deep: bool
          Whether to deep-copy `X`.
      """
      X_alt_index = y.index if isinstance(y, pd.Series) else index
      X = convert_input(
          X, columns=columns, deep=deep, index=X_alt_index
      )
      if y is not None:
          y = convert_input_vector(y, index=X.index)
          # N.B.: If either was already pandas, it keeps its index.
  
          if any(X.index != y.index):
              msg = (
                  "`X` and `y` both have indexes, but they do not match. If you are shuffling your input data on "
                  "purpose (e.g. via permutation_test_score) use np arrays instead of data frames / series"
              )
              raise ValueError(msg)
          if X.shape[0] != y.shape[0]:
              raise ValueError(
                  "The length of X is "
                  + str(X.shape[0])
                  + " but length of y is "
                  + str(y.shape[0])
                  + "."
              )
      return X, y
  
imports: from abc import abstractmethod
  from enum import Enum, auto
  import warnings
  import pandas
  import numpy
  import sklearn.base
  from pandas.api.types import is_object_dtype, is_string_dtype, is_numeric_dtype
  from pandas.core.dtypes.dtypes import CategoricalDtype
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.exceptions import NotFittedError
  from typing import Dict, List, Optional, Union
  from scipy.sparse import csr_matrix
  from sklearn.preprocessing import LabelEncoder
label_desc: Use image node_id 4 for calling a global function with example usage: convert_inputs(X, y, columns, index, deep) and returns: X,  y