def METHOD_NAME(self, calldef, expected_type):
    self.assertTrue(
        isinstance(calldef.return_type, expected_type),
        ("the function's '%s' expected return type is '%s' and in " +
            "reality it is different('%s')") %
        (calldef.name, expected_type.__name__,
         calldef.return_type.__class__.__name__))