def METHOD_NAME(self, context, payload, instances, deadline):
    # Ensure we operate on a copy, a shallow copy is fine.
    payload = payload.copy()
    # Include critical environment variables with submission + api.Session
    keys = [
        # Submit along the current Avalon tool setup that we launched
        # this application with so the Render Slave can build its own
        # similar environment using it, e.g. "houdini17.5;pluginx2.3"
        "AVALON_TOOLS"
    ]
    # Add OpenPype version if we are running from build.
    if is_running_from_build():
        keys.append("OPENPYPE_VERSION")
    # Add mongo url if it's enabled
    if context.data.get("deadlinePassMongoUrl"):
        keys.append("OPENPYPE_MONGO")
    environment = dict(
        {key: os.environ[key] for key in keys if key in os.environ},
        **legacy_io.Session
    )
    environment["PYBLISH_ACTIVE_INSTANCES"] = ",".join(instances)
    payload["JobInfo"].update(
        {
            "EnvironmentKeyValue%d"
            % index: "{key}={value}".format(
                key=key, value=environment[key]
            )
            for index, key in enumerate(environment)
        }
    )
    # Submit
    self.log.debug("Submitting..")
    self.log.debug(json.dumps(payload, indent=4, sort_keys=True))
    # E.g. http://192.168.0.1:8082/api/jobs
    url = "{}/api/jobs".format(deadline)
    response = requests.post(url, json=payload)
    if not response.ok:
        raise Exception(response.text)