def METHOD_NAME(self):
    dln_job_info = DeadlineJobInfo(Plugin="AfterEffects")
    context = self._instance.context
    batch_name = os.path.basename(self._instance.data["source"])
    if is_in_tests():
        batch_name += datetime.now().strftime("%d%m%Y%H%M%S")
    dln_job_info.Name = self._instance.data["name"]
    dln_job_info.BatchName = batch_name
    dln_job_info.Plugin = "AfterEffects"
    dln_job_info.UserName = context.data.get(
        "deadlineUser", getpass.getuser())
    if self._instance.data["frameEnd"] > self._instance.data["frameStart"]:
        # Deadline requires integers in frame range
        frame_range = "{}-{}".format(
            int(round(self._instance.data["frameStart"])),
            int(round(self._instance.data["frameEnd"])))
        dln_job_info.Frames = frame_range
    dln_job_info.Priority = self.priority
    dln_job_info.Pool = self._instance.data.get("primaryPool")
    dln_job_info.SecondaryPool = self._instance.data.get("secondaryPool")
    dln_job_info.Group = self.group
    dln_job_info.Department = self.department
    dln_job_info.ChunkSize = self.chunk_size
    dln_job_info.OutputFilename += \
        os.path.basename(self._instance.data["expectedFiles"][0])
    dln_job_info.OutputDirectory += \
        os.path.dirname(self._instance.data["expectedFiles"][0])
    dln_job_info.JobDelay = "00:00:00"
    keys = [
        "FTRACK_API_KEY",
        "FTRACK_API_USER",
        "FTRACK_SERVER",
        "AVALON_PROJECT",
        "AVALON_ASSET",
        "AVALON_TASK",
        "AVALON_APP_NAME",
        "OPENPYPE_DEV",
        "OPENPYPE_LOG_NO_COLORS",
        "IS_TEST"
    ]
    # 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 self._instance.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)
    for key in keys:
        value = environment.get(key)
        if value:
            dln_job_info.EnvironmentKeyValue[key] = value
    # to recognize render jobs
    dln_job_info.add_render_job_env_var()
    return dln_job_info