def METHOD_NAME(jdl: str, owner: str, ownerGroup: str) -> JobManifest:
    jobManifest = JobManifest()
    res = jobManifest.load(jdl)
    if not res["OK"]:
        return res
    jobManifest.setOptionsFromDict({"Owner": owner, "OwnerGroup": ownerGroup})
    res = jobManifest.check()
    if not res["OK"]:
        return res
    return S_OK(jobManifest)