code: def _get_frame_result_type(result, objs):
      """
      return appropriate class of DataFrame-like concat
      if all blocks are sparse, return SparseDataFrame
      otherwise, return 1st obj
      """
  
      if result.blocks and (
          all(is_sparse(b) for b in result.blocks)
          or all(isinstance(obj, ABCSparseDataFrame) for obj in objs)
      ):
          from pandas.core.sparse.api import SparseDataFrame
  
          return SparseDataFrame
      else:
          return next(
              obj
              for obj in objs
              if not isinstance(obj, ABCSparseDataFrame)
          )
  
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 3 for calling a global function with example usage: _get_frame_result_type(result, objs) and returns: SparseDataFrame, next