PY-9342 Distinguish between function and method types