def is_cython_func_or_method(method):
    """ Test if the given input is a Cython method or function. """
    # The only way to get the type from the method with str comparison ...
    return "cython_function_or_method" in str(type(method))