def METHOD_NAME(
    self, params: dict
) -> Optional[LaunchActionResultDict]:
    import shlex
    import os
    from robocorp_ls_core.subprocess_wrapper import launch
    pre_run_scripts = self._get_pre_run_scripts(params["robot"])
    if pre_run_scripts:
        env = params["env"]
        cwd = str(pre_run_scripts.robot_yaml.parent)
        for script in pre_run_scripts.pre_run_scripts:
            sys.stderr.write(
                f"Running preRunScript: {script} from {str(pre_run_scripts.robot_yaml)}\n"
            )
            command = shlex.split(script, posix=True)
            if command:
                use_command: Union[List[str], str]
                if command[0].endswith((".bat", ".sh")):
                    shell = True
                    use_command = script
                else:
                    if command[0].endswith(".py"):
                        # 1. Find the .py file in the PATH and make it absolute
                        if not os.path.isabs(command[0]):
                            found = find_in_path(env, command[0], False)
                            if found:
                                command[0] = found
                        # 2. Make python the executable so that it'll run
                        # that file with python and not do what's registered
                        # in the system (as that could fail on Windows).
                        command.insert(0, "python")
                    shell = False
                    # We need to search it on based on the 'PATH'
                    if not os.path.isabs(command[0]):
                        found = find_executable(env, command[0])
                        # Note: we need to search the actual executable for
                        # something as:
                        # `python prerun.py`
                        # to work (because otherwise it'll search it based
                        # on the current environment and not based on the
                        # target environment).
                        if found:
                            command[0] = found
                        else:
                            # We couldn't find it and it's not absolute, let
                            # the shell sort it out.
                            shell = True
                            use_command = script
                    use_command = command
                result = launch(
                    use_command,
                    timeout=60 * 60,  # 1 hour timeout
                    cwd=cwd,
                    show_interactive_output=True,
                    env=env,
                    shell=shell,
                )
                if not result.success:
                    return result.as_dict()
    return None