import inspect


def codeReturnsSomething(func):
	"""
	Checks whether a function/method appears to have a return statement that returns data. It simply examines the code for the function/method looking for a return call.

	:param func: Function to check
	:type func: function/method
	:return: Whether the function/method
	:rtype: bool
	"""

	sourceCode = inspect.getsource(func).split('\n')
	for line in sourceCode:
		tokens = line.strip().split()
		if len(tokens) >= 2 and (tokens[0] == 'return' or tokens[0] == 'yield'):
			return True
	return False