code: def setup_versioned_routes(routes, version=None):
      
      prefix = '/' + version if version else ""
      for r in routes:
          path, method = r
          route(prefix + path, method, routes[r])
docs: Set up routes with a version prefix.