code: def build_path(operation, ns):
      
      try:
          return ns.url_for(operation, _external=False)
      except BuildError as error:
          # we are missing some URI path parameters
          uri_templates = {
              argument: "{{{}}}".format(argument)
              for argument in error.suggested.arguments
          }
          # flask will sometimes try to quote '{' and '}' characters
          return unquote(ns.url_for(operation, _external=False, **uri_templates))
docs: Build a path URI for an operation.