def METHOD_NAME(
    jobID,
    jobParams,
    resourceParams,
    optimizerParams,
    extraOptions="",
    defaultWrapperLocation="DIRAC/WorkloadManagementSystem/JobWrapper/JobWrapperTemplate.py",
    log=gLogger,
    logLevel="INFO",
):
    """This method creates a job wrapper filled with the CE and Job parameters to execute the job.
    Main user is the JobAgent
    """
    if isinstance(extraOptions, str) and extraOptions.endswith(".cfg"):
        extraOptions = f"--cfg {extraOptions}"
    arguments = {"Job": jobParams, "CE": resourceParams, "Optimizer": optimizerParams}
    log.verbose(f"Job arguments are: \n {arguments}")
    mkDir(os.path.join(os.getcwd(), "job/Wrapper"))
    diracRoot = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
    jobWrapperFile = f"{os.getcwd()}/job/Wrapper/Wrapper_{jobID}"
    if os.path.exists(jobWrapperFile):
        log.verbose("Removing existing Job Wrapper for", jobID)
        os.remove(jobWrapperFile)
    with open(os.path.join(diracRoot, defaultWrapperLocation)) as fd:
        wrapperTemplate = fd.read()
    if "LogLevel" in jobParams:
        logLevel = jobParams["LogLevel"]
        log.info("Found Job LogLevel JDL parameter with value", logLevel)
    else:
        log.info("Applying default LogLevel JDL parameter with value", logLevel)
    dPython = sys.executable
    realPythonPath = os.path.realpath(dPython)
    log.debug("Real python path after resolving links is: ", realPythonPath)
    dPython = realPythonPath
    # Making real substitutions
    # wrapperTemplate = wrapperTemplate.replace( "@JOBARGS@", str( arguments ) )
    wrapperTemplate = wrapperTemplate.replace("@SITEPYTHON@", os.getcwd())
    jobWrapperJsonFile = jobWrapperFile + ".json"
    with open(jobWrapperJsonFile, "w", encoding="utf8") as jsonFile:
        json.dump(str(arguments), jsonFile, ensure_ascii=False)
    with open(jobWrapperFile, "w") as wrapper:
        wrapper.write(wrapperTemplate)
    jobExeFile = f"{os.getcwd()}/job/Wrapper/Job{jobID}"
    jobFileContents = """#!/bin/sh