code: def _get_series_result_type(result, objs=None):
      """
      return appropriate class of Series concat
      input is either dict or array-like
      """
      from pandas import SparseSeries, SparseDataFrame, DataFrame
  
      # concat Series with axis 1
      if isinstance(result, dict):
          # concat Series with axis 1
          if all(
              isinstance(c, (SparseSeries, SparseDataFrame))
              for c in compat.itervalues(result)
          ):
              return SparseDataFrame
          else:
              return DataFrame
  
      # otherwise it is a SingleBlockManager (axis = 0)
      if result._block.is_sparse:
          return SparseSeries
      else:
          return objs[0]._constructor
  
file_path: catboost/contrib/python/pandas/py2/pandas/core/dtypes/concat.py
imports: import numpy
  from pandas._libs import tslib, tslibs
  from pandas.core.dtypes.common import _NS_DTYPE, _TD_DTYPE, is_bool_dtype, is_categorical_dtype, is_datetime64_dtype, is_datetime64tz_dtype, is_dtype_equal, is_extension_array_dtype, is_object_dtype, is_sparse, is_timedelta64_dtype
  from pandas.core.dtypes.generic import ABCDatetimeArray, ABCDatetimeIndex, ABCIndexClass, ABCPeriodIndex, ABCRangeIndex, ABCSparseDataFrame, ABCTimedeltaIndex
  from pandas import compat
label_desc: Use image node_id 2 for calling a global function with example usage: _get_series_result_type(result, objs) and returns: SparseSeries, objs, SparseDataFrame, DataFrame