class_docstr: Provides platform-agnostic path substitution for execution Makefiles, ensuring that POSIX-style
  relative paths are joined correctly with POSIX-style or Windows-style recipe root paths.
  
  For example, given a format string `s = "{path:prp/my/subpath.txt}"`, invoking
  `s.format(path=_MakefilePathFormat(recipe_root_path="/my/recipe/root/path", ...))` on
  Unix systems or
  `s.format(path=_MakefilePathFormat(recipe_root_path="C:\my\recipe\root\path", ...))`` on
  Windows systems will yield "/my/recipe/root/path/my/subpath.txt" or
  "C:/my/recipe/root/path/my/subpath.txt", respectively.
  
  Additionally, given a format string `s = "{path:exe/my/subpath.txt}"`, invoking
  `s.format(path=_MakefilePathFormat(execution_directory_path="/my/exe/dir/path", ...))` on
  Unix systems or
  `s.format(path=_MakefilePathFormat(execution_directory_path="/my/exe/dir/path", ...))`` on
  Windows systems will yield "/my/exe/dir/path/my/subpath.txt" or
  "C:/my/exe/dir/path/my/subpath.txt", respectively.
class_docstr_tok: ["Provides","platform-agnostic","path","substitution","for","execution","Makefiles",",","ensuring","that","POSIX-style","relative","paths","are","joined","correctly","with","POSIX-style","or","Windows-style","recipe","root","paths",".","For","example",",","given","a","format","string","`","s","=","``","{","path",":","prp\/my\/subpath.txt","}","''","`",",","invoking","`","s.format","(","path=_MakefilePathFormat","(","recipe_root_path=","''","\/my\/recipe\/root\/path","''",",","...",")",")","`","on","Unix","systems","or","`","s.format","(","path=_MakefilePathFormat","(","recipe_root_path=","''","C",":","\\my\\recipe\\root\\path","''",",","...",")",")","``","on","Windows","systems","will","yield","``","\/my\/recipe\/root\/path\/my\/subpath.txt","''","or","''","C",":","\/my\/recipe\/root\/path\/my\/subpath.txt","''",",","respectively",".","Additionally",",","given","a","format","string","`","s","=","``","{","path",":","exe\/my\/subpath.txt","}","''","`",",","invoking","`","s.format","(","path=_MakefilePathFormat","(","execution_directory_path=","''","\/my\/exe\/dir\/path","''",",","...",")",")","`","on","Unix","systems","or","`","s.format","(","path=_MakefilePathFormat","(","execution_directory_path=","''","\/my\/exe\/dir\/path","''",",","...",")",")","``","on","Windows","systems","will","yield","``","\/my\/exe\/dir\/path\/my\/subpath.txt","''","or","''","C",":","\/my\/exe\/dir\/path\/my\/subpath.txt","''",",","respectively","."]
docstr: :param path_spec: A substitution path spec of the form `<placeholder>/<subpath>`. This
                    method substitutes `<placeholder>` with `<recipe_root_path>`, if
                    `<placeholder>` is `prp`, or `<execution_directory_path>`, if
                    `<placeholder>` is `exe`.
docstr_tok: [":","param","path_spec",":","A","substitution","path","spec","of","the","form","`","<","placeholder",">","\/","<","subpath",">","`",".","This","method","substitutes","`","<","placeholder",">","`","with","`","<","recipe_root_path",">","`",",","if","`","<","placeholder",">","`","is","`","prp","`",",","or","`","<","execution_directory_path",">","`",",","if","`","<","placeholder",">","`","is","`","exe","`","."]
code: def __format__(self, path_spec: str) -> str:
      """
      :param path_spec: A substitution path spec of the form `<placeholder>/<subpath>`. This
                        method substitutes `<placeholder>` with `<recipe_root_path>`, if
                        `<placeholder>` is `prp`, or `<execution_directory_path>`, if
                        `<placeholder>` is `exe`.
      """
      if path_spec.startswith(
          _MakefilePathFormat._RECIPE_ROOT_PATH_PREFIX_PLACEHOLDER
      ):
          return self._get_formatted_path(
              path_spec=path_spec,
              prefix_placeholder=_MakefilePathFormat._RECIPE_ROOT_PATH_PREFIX_PLACEHOLDER,
              replacement_path=self.recipe_root_path,
          )
      elif path_spec.startswith(
          _MakefilePathFormat._EXECUTION_DIRECTORY_PATH_PREFIX_PLACEHOLDER
      ):
          return self._get_formatted_path(
              path_spec=path_spec,
              prefix_placeholder=_MakefilePathFormat._EXECUTION_DIRECTORY_PATH_PREFIX_PLACEHOLDER,
              replacement_path=self.execution_directory_path,
          )
      else:
          raise ValueError(
              f"Invalid Makefile string format path spec: {path_spec}"
          )
  
imports: import hashlib
  import logging
  import os
  import pathlib
  import re
  import shutil
  from typing import Dict, List
  from mlflow.environment_variables import MLFLOW_RECIPES_EXECUTION_DIRECTORY, MLFLOW_RECIPES_EXECUTION_TARGET_STEP_NAME
  from mlflow.recipes.step import BaseStep, StepStatus
  from mlflow.utils.file_utils import read_yaml, write_yaml
  from mlflow.utils.process import _exec_cmd
label_desc: Use image node_id 3 for calling the _MakefilePathFormat obj's underlying member method code with example usage: obj.__format__(path_spec) and returns: self, self