import inspect
import re


def function_body_code(function):
    """Get the code of the body of a function as a string"""
    source = inspect.getsource(function)
    pattern = re.compile(r'\s*def\s+\w+\s*\(.*?\)\s*:\s*\n', flags=re.S)
    return re.sub(pattern, '', source)