def _get_frame_result_type(result, objs):
if (result.blocks and (<EOL>any(isinstance(obj, ABCSparseDataFrame) for obj in objs))):<EOL><INDENT>from pandas.core.sparse.api import SparseDataFrame<EOL>return SparseDataFrame<EOL><DEDENT>else:<EOL><INDENT>return next(obj for obj in objs if not isinstance(obj,<EOL>ABCSparseDataFrame))<EOL><DEDENT>
return appropriate class of DataFrame-like concat
if all blocks are sparse, return SparseDataFrame
otherwise, return 1st obj