import re


def parse_python_func_return(func_str):
    """Get a list of the variable names in a Python function return statement.

    The return statement may return a tuple (with parenthesis or not) or a single variable.

    """

    out = []
    match = re.search(r'return \(*([\S\s][^\)]+)\)*', func_str)
    if match:
        match_clean = match.group(1).strip().strip(',')
        out = [i.strip() for i in match_clean.split(',')]

    return out