def METHOD_NAME(self, train_dsl, cpn):
    """
    @param train_dsl: dict or str
    @param cpn: list or str
    """
    if isinstance(train_dsl, dict):
        train_dsl = json.dumps(train_dsl)
    config_data = {
        "cpn_str": cpn,
        "train_dsl": train_dsl,
        "version": "2"
    }
    res = self._post(url="job/dsl/generate", handle_result=True, json=config_data)
    if not res.get("data"):
        res["data"] = {}
    return res