@app.route(<EOL>"<STR_LIT>", methods=["<STR_LIT:GET>", "<STR_LIT:POST>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]<EOL>)<EOL>def view_status_code(codes):
if "<STR_LIT:U+002C>" not in codes:<EOL><INDENT>try:<EOL><INDENT>code = int(codes)<EOL><DEDENT>except ValueError:<EOL><INDENT>return Response("<STR_LIT>", status=<NUM_LIT>)<EOL><DEDENT>return status_code(code)<EOL><DEDENT>choices = []<EOL>for choice in codes.split("<STR_LIT:U+002C>"):<EOL><INDENT>if "<STR_LIT::>" not in choice:<EOL><INDENT>code = choice<EOL>weight = <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>code, weight = choice.split("<STR_LIT::>")<EOL><DEDENT>try:<EOL><INDENT>choices.append((int(code), float(weight)))<EOL><DEDENT>except ValueError:<EOL><INDENT>return Response("<STR_LIT>", status=<NUM_LIT>)<EOL><DEDENT><DEDENT>code = weighted_choice(choices)<EOL>return status_code(code)<EOL>
Return status code or random status code if more than one are given
    ---
    tags:
      - Status codes
    parameters:
      - in: path
        name: codes
    produces:
      - text/plain
    responses:
      100:
        description: Informational responses
      200:
        description: Success
      300:
        description: Redirection
      400:
        description: Client Errors
      500:
        description: Server Errors