demo_ref_callable.py:
def x(): a = 5 print(callable(x))
➜ begtut>python demo_callable.py
True