Fix Python – How do I forward-declare a function to avoid `NameError`s for functions defined later?

Is it possible to forward-declare a function in Python? I want to sort a list using my own cmp function before it is declared.
print “\n”.join([str(bla) for bla in sorted(mylist, cmp = cmp_configs)])

I’ve put the definition of cmp_configs method after the invocation. It fails with this error:
NameError: name ‘cmp_configs’ is not defined

Is the….