def _arith_method_SPARSE_SERIES(cls, op, special):
op_name = _get_op_name(op, special)<EOL>def wrapper(self, other):<EOL><INDENT>if isinstance(other, ABCDataFrame):<EOL><INDENT>return NotImplemented<EOL><DEDENT>elif isinstance(other, ABCSeries):<EOL><INDENT>if not isinstance(other, ABCSparseSeries):<EOL><INDENT>other = other.to_sparse(fill_value=self.fill_value)<EOL><DEDENT>return _sparse_series_op(self, other, op, op_name)<EOL><DEDENT>elif is_scalar(other):<EOL><INDENT>with np.errstate(all='<STR_LIT:ignore>'):<EOL><INDENT>new_values = op(self.values, other)<EOL><DEDENT>return self._constructor(new_values,<EOL>index=self.index,<EOL>name=self.name)<EOL><DEDENT>else:  <EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>.format(other=type(other)))<EOL><DEDENT><DEDENT>wrapper.__name__ = op_name<EOL>return wrapper<EOL>
Wrapper function for Series arithmetic operations, to avoid
code duplication.