Add a handler to the route list

        :param uri: path to match
        :param methods: sequence of accepted method names. If none are
            provided, any method is allowed
        :param handler: request handler function.
            When executed, it should provide a response object.
        :param strict_slashes: strict to trailing slash
        :param version: current version of the route or blueprint. See
            docs for further details.
        :return: Nothing

def add(
        self,
        uri,
        methods,
        handler,
        host=None,
        strict_slashes=False,
        version=None,
        name=None,
    ):
        """Add a handler to the route list

        :param uri: path to match
        :param methods: sequence of accepted method names. If none are
            provided, any method is allowed
        :param handler: request handler function.
            When executed, it should provide a response object.
        :param strict_slashes: strict to trailing slash
        :param version: current version of the route or blueprint. See
            docs for further details.
        :return: Nothing
        """
        if version is not None:
            version = re.escape(str(version).strip("/").lstrip("v"))
            uri = "/".join(["/v{}".format(version), uri.lstrip("/")])
        # add regular version
        self._add(uri, methods, handler, host, name)

        if strict_slashes:
            return

        if not isinstance(host, str) and host is not None:
            # we have gotten back to the top of the recursion tree where the
            # host was originally a list. By now, we've processed the strict
            # slashes logic on the leaf nodes (the individual host strings in
            # the list of host)
            return

        # Add versions with and without trailing /
        slashed_methods = self.routes_all.get(uri + "/", frozenset({}))
        unslashed_methods = self.routes_all.get(uri[:-1], frozenset({}))
        if isinstance(methods, Iterable):
            _slash_is_missing = all(
                method in slashed_methods for method in methods
            )
            _without_slash_is_missing = all(
                method in unslashed_methods for method in methods
            )
        else:
            _slash_is_missing = methods in slashed_methods
            _without_slash_is_missing = methods in unslashed_methods

        slash_is_missing = not uri[-1] == "/" and not _slash_is_missing
        without_slash_is_missing = (
            uri[-1] == "/" and not _without_slash_is_missing and not uri == "/"
        )
        # add version with trailing slash
        if slash_is_missing:
            self._add(uri + "/", methods, handler, host, name)
        # add version without trailing slash
        elif without_slash_is_missing:
            self._add(uri[:-1], methods, handler, host, name)