[FEAT] Always use function.__name__

According to the Python documentation [1] function.__name__ was
already introduced in Python 2.6, so the if-condition added in
8f1a9b77697e941efd918e03a00380fc98416836 is true always.

[1]: https://docs.python.org/2/reference/datamodel.html#index-36

Change-Id: I827af43a8de64be439f2acf5f800be9ae9c7fc59