def METHOD_NAME(self) -> dict:
    """Validates and converts arguments from post request to dict.
    Returns:
        Arguments provided from post request as a dict.
    """
    try:
        arguments = {
            "arguments": "{}",
            "type": self.get_body_argument("type")
        }
    except tornado.web.MissingArgumentError:
        raise Exception("No type provided.")
    try:
        arguments["arguments"] = self.get_body_argument("arguments")
    except tornado.web.MissingArgumentError:
        # If no arguments are provided, ignore error as arguments has been
        # set to a stringified JSON object by default.
        pass
    try:
        arguments["arguments"] = json.loads(arguments.get("arguments"))
    except json.decoder.JSONDecodeError as e:
        raise Exception("Invalid JSON provided as arguments: {}".format(str(e)))
    # If invalid JSON is provided that is incorretly escaped
    # arguments.get("arguments") can be a string. This Ensure that
    # json.loads properly converts stringified JSON to dict.
    if type(arguments.get("arguments")) != dict:
        raise Exception("Invalid JSON provided as arguments!")
    try:
        arguments["source"] = self.get_body_argument("source")
    except tornado.web.MissingArgumentError:
        arguments["source"] = ""
    if arguments.get("type") != "custom":
        if len(arguments.get("source")) == 0:
            raise Exception("No source provided.")
    return arguments