Check if a function (or an 'extended' function) exists for a key on a driver, and if it does, return it.
        :param func_name: name of the function
        :return: a callable or none

def __get_function_or_ex_function(self, func_name):
        """
        Check if a function (or an 'extended' function) exists for a key on a driver, and if it does, return it.
        :param func_name: name of the function
        :return: a callable or none
        """
        # try function name as given
        try:
            return getattr(self.driver, func_name)
        except AttributeError:
            pass
        # try prefixing name with `ex_`
        try:
            return getattr(self.driver, 'ex_' + func_name)
        except AttributeError:
            pass
        # no such function
        raise AttributeError(
            "No function named `{0}` or `{1}` in class `{2}`"
            .format(func_name, 'ex_'+func_name, self.__class__.__name__))