def METHOD_NAME(self):
    """This method is used for writing python script when ``shell: python``
    is set. The content from ``run`` section is added into a python
    script. The file is written to run directory and we simply invoke
    python script by running ``python script.py``
    """
    python_content = self.recipe.get("run")
    script_path = "%s.py" % os.path.join(self.stage_dir, self.name)
    write_file(script_path, python_content)
    self.logger.debug(f"[{self.name}]: Writing python script to: {script_path}")
    shutil.copy2(
        script_path, os.path.join(self.test_root, os.path.basename(script_path))
    )
    self.logger.debug(
        f"[{self.name}]: Copying file: {script_path} to: {os.path.join(self.test_root, os.path.basename(script_path))}"
    )
    # lines = [f"python {script_path}"]
    # return lines