<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _call_spy(self, *args, **kwargs):
      '''
      Wrapper to call the spied-on function. Operates similar to
      Expectation.test.
      '''
      if self._spy_side_effect:
          if self._spy_side_effect_args or self._spy_side_effect_kwargs:
              self._spy_side_effect(
                  *self._spy_side_effect_args,
                  **self._spy_side_effect_kwargs)
          else:
              self._spy_side_effect(*args, **kwargs)

      return_value = self._stub.call_orig(*args, **kwargs)
      if self._spy_return:
          self._spy_return(return_value)

      return return_value