Return first function whose name *contains* the string `pattern`.

        :param func: partial function name (ex. key_pair)
        :return: list function that goes with it (ex. list_key_pairs)

def __get_function_by_pattern(self, pattern):
        """
        Return first function whose name *contains* the string `pattern`.

        :param func: partial function name (ex. key_pair)
        :return: list function that goes with it (ex. list_key_pairs)
        """
        function_names = [name for name in dir(self.driver) if pattern in name]
        if function_names:
            name = function_names[0]
            if len(function_names) > 1:
                log.warn(
                    "Several functions match pattern `%s`: %r -- using first one!",
                    pattern, function_names)
            return getattr(self.driver, name)
        else:
            # no such function
            raise AttributeError(
                "No function name contains `{0}` in class `{1}`"
                .format(pattern, self.__class__.__name__))