def _wrap_result(self, result):
if isinstance(result, ABCSeries) and self._selection is not None:<EOL><INDENT>result.name = self._selection<EOL><DEDENT>if isinstance(result, ABCSeries) and result.empty:<EOL><INDENT>obj = self.obj<EOL>if isinstance(obj.index, PeriodIndex):<EOL><INDENT>result.index = obj.index.asfreq(self.freq)<EOL><DEDENT>else:<EOL><INDENT>result.index = obj.index._shallow_copy(freq=self.freq)<EOL><DEDENT>result.name = getattr(obj, '<STR_LIT:name>', None)<EOL><DEDENT>return result<EOL>
Potentially wrap any results.