Get the name to reference a function by

        :param func: function to get the name of
        :type func: callable

def get_name(self, func):
        '''
        Get the name to reference a function by

        :param func: function to get the name of
        :type func: callable
        '''
        if hasattr(func, 'name'):
            return func.name

        return '%s.%s' % (
            func.__module__,
            func.__name__
        )