# Buggy code
def concat(cls, axis, left_parts, right_parts):
    """Concatenate the blocks with another set of blocks.

    Note: Assumes that the blocks are already the same shape on the
        dimension being concatenated. A ValueError will be thrown if this
        condition is not met.

    Args:
        axis: The axis to concatenate to.
        right_parts: the other blocks to be concatenated. This is a
            BaseFrameManager object.

    Returns
    -------
        A new BaseFrameManager object, the type of object that called this.
    """
    if type(right_parts) is list:
        # `np.array` with partitions of empty ModinFrame has a shape (0,)
        # but `np.concatenate` can concatenate arrays only if its shapes at
        # specified axis are equals, so filtering empty frames to avoid concat error
        right_parts = [o for o in right_parts if o.size != 0]
        return np.concatenate([left_parts] + right_parts, axis=axis)
    else:
        return np.append(left_parts, right_parts, axis=axis)


# Traceback (TypeError)
Traceback (most recent call last):
File "test_outer.py", line 13, in <module>
md_df["b"] = pd.Series(np.zeros(len(md_df))) # TypeError
File "/localdisk/dchigare/repos/modin_bp/modin/pandas/dataframe.py", line 1978, in __setitem__
join="left",
File "/localdisk/dchigare/repos/modin_bp/modin/backends/pandas/query_compiler.py", line 303, in concat
new_modin_frame = self._modin_frame._concat(axis, other_modin_frame, join, sort)
File "/localdisk/dchigare/repos/modin_bp/modin/engines/base/frame/data.py", line 1850, in _concat
axis ^ 1, others, how, sort, force_repartition=True
File "/localdisk/dchigare/repos/modin_bp/modin/engines/base/frame/data.py", line 1701, in _copartition
joined_index = self._join_index_objects(axis, index_other_obj, how, sort)
File "/localdisk/dchigare/repos/modin_bp/modin/engines/base/frame/data.py", line 980, in _join_index_objects
joined_obj = merge_index(joined_obj, obj)
File "/localdisk/dchigare/repos/modin_bp/modin/engines/base/frame/data.py", line 974, in merge_index
return obj1.join(obj2, how=how, sort=sort)
File "/localdisk/dchigare/miniconda3/envs/modin_tests/lib/python3.7/site-packages/pandas/core/indexes/datetimelike.py", line 893, in join
sort=sort,
File "/localdisk/dchigare/miniconda3/envs/modin_tests/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3483, in join
return this.join(other, how=how, return_indexers=return_indexers)
File "/localdisk/dchigare/miniconda3/envs/modin_tests/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3494, in join
other, how=how, return_indexers=return_indexers
File "/localdisk/dchigare/miniconda3/envs/modin_tests/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3815, in _join_monotonic
join_index, lidx, ridx = self._left_indexer(sv, ov)
File "/localdisk/dchigare/miniconda3/envs/modin_tests/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 257, in _left_indexer
return libjoin.left_join_indexer(left, right)
File "pandas/_libs/join.pyx", line 357, in pandas._libs.join.left_join_indexer
TypeError: '<' not supported between instances of 'Timestamp' and 'int'

# Fixed code
def concat(cls, axis, left_parts, right_parts):
    """Concatenate the blocks with another set of blocks.

    Note: Assumes that the blocks are already the same shape on the
        dimension being concatenated. A ValueError will be thrown if this
        condition is not met.

    Args:
        axis: The axis to concatenate to.
        right_parts: the other blocks to be concatenated. This is a
            BaseFrameManager object.

    Returns
    -------
        A new BaseFrameManager object, the type of object that called this.
    """
    if type(right_parts) is list:
        # `np.array` with partitions of empty ModinFrame has a shape (0,)
        # but `np.concatenate` can concatenate arrays only if its shapes at
        # specified axis are equals, so filtering empty frames to avoid concat error
        right_parts = [o for o in right_parts if o.size != 0]
        to_concat = [left_parts] + right_parts if left_parts.size != 0 else right_parts
        return np.concatenate(to_concat, axis=axis) if len(to_concat) else left_parts
    else:
        return np.append(left_parts, right_parts, axis=axis)