# Buggy code
def reindex(
    self,
    labels=None,
    index=None,
    columns=None,
    axis=None,
    method=None,
    copy=True,
    level=None,
    fill_value=np.nan,
    limit=None,
    tolerance=None,
):
    axis = self._get_axis_number(axis)
    if (columns is not None and self._query_compiler.has_multiindex(axis=1)) or (
        index is not None and self._query_compiler.has_multiindex()
    ):
        return self._default_to_pandas(
            "reindex",
            labels=labels,
            index=index,
            columns=columns,
            method=method,
            copy=copy,
            level=level,
            fill_value=fill_value,
            limit=limit,
            tolerance=tolerance,
        )
    if (
        level is not None
        or (axis == 1 and self._query_compiler.has_multiindex(axis=1))
        or (axis == 0 and self._query_compiler.has_multiindex())
    ):
        return self._default_to_pandas(
            "reindex",
            labels=labels,
            level=level,
            method=method,
            copy=copy,
            axis=axis,
            fill_value=fill_value,
            limit=limit,
            tolerance=tolerance,
        )
    if axis == 0 and labels is not None:
        index = labels
    elif labels is not None:
        columns = labels
    new_query_compiler = None
    if index is not None:
        if not isinstance(index, pandas.Index):
            index = pandas.Index(index)
        if not index.equals(self.index):
            new_query_compiler = self._query_compiler.reindex(
                axis=0,
                labels=index,
                method=method,
                fill_value=fill_value,
                limit=limit,
                tolerance=tolerance,
            )
    if new_query_compiler is None:
        new_query_compiler = self._query_compiler
    final_query_compiler = None
    if columns is not None:
        if not isinstance(columns, pandas.Index):
            columns = pandas.Index(columns)
        if not columns.equals(self.columns):
            final_query_compiler = new_query_compiler.reindex(
                axis=1,
                labels=columns,
                method=method,
                fill_value=fill_value,
                limit=limit,
                tolerance=tolerance,
            )
    if final_query_compiler is None:
        final_query_compiler = new_query_compiler
    return self._create_or_update_from_compiler(final_query_compiler, not copy)


# Traceback (TypeError)
Traceback (most recent call last):
File "../rofl.py", line 5, in <module>
res = sr.reindex([1, 2, 3, 4, 5])
File "/localdisk/dchigare/repos/modin_bp/modin/pandas/series.py", line 1040, in reindex
fill_value=fill_value,
File "/localdisk/dchigare/repos/modin_bp/modin/pandas/base.py", line 1714, in reindex
tolerance=tolerance,
File "/localdisk/dchigare/repos/modin_bp/modin/pandas/base.py", line 395, in _default_to_pandas
pandas_obj, *args, **kwargs
File "/localdisk/dchigare/miniconda3/envs/modin_tests/lib/python3.7/site-packages/pandas/core/series.py", line 4315, in reindex
return super().reindex(index=index, **kwargs)
File "/localdisk/dchigare/miniconda3/envs/modin_tests/lib/python3.7/site-packages/pandas/core/generic.py", line 4786, in reindex
"reindex() got an unexpected keyword "
TypeError: reindex() got an unexpected keyword argument "labels"

# Fixed code
def reindex(
    self,
    index=None,
    columns=None,
    copy=True,
    **kwargs,
):
    if (
        kwargs.get("level") is not None
        or (index is not None and self._query_compiler.has_multiindex())
        or (columns is not None and self._query_compiler.has_multiindex(axis=1))
    ):
        if index is not None:
            kwargs["index"] = index
        if columns is not None:
            kwargs["columns"] = columns
        return self._default_to_pandas("reindex", copy=copy, **kwargs)
    new_query_compiler = None
    if index is not None:
        if not isinstance(index, pandas.Index):
            index = pandas.Index(index)
        if not index.equals(self.index):
            new_query_compiler = self._query_compiler.reindex(
                axis=0, labels=index, **kwargs
            )
    if new_query_compiler is None:
        new_query_compiler = self._query_compiler
    final_query_compiler = None
    if columns is not None:
        if not isinstance(columns, pandas.Index):
            columns = pandas.Index(columns)
        if not columns.equals(self.columns):
            final_query_compiler = new_query_compiler.reindex(
                axis=1, labels=columns, **kwargs
            )
    if final_query_compiler is None:
        final_query_compiler = new_query_compiler
    return self._create_or_update_from_compiler(final_query_compiler, not copy)