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`.
  :param prefix_placeholder: The prefix placeholder, which is present at the beginning of
                             `path_spec`. Either `prp` or `exe`.
  :param replacement_path: The path to use to replace the specified `prefix_placeholder`
                           in the specified `path_spec`.
  :return: The formatted path obtained by replacing the ``prefix placeholder`` in the
           specified ``path_spec`` with the specified ``replacement_path``.
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","`",".",":","param","prefix_placeholder",":","The","prefix","placeholder",",","which","is","present","at","the","beginning","of","`","path_spec","`",".","Either","`","prp","`","or","`","exe","`",".",":","param","replacement_path",":","The","path","to","use","to","replace","the","specified","`","prefix_placeholder","`","in","the","specified","`","path_spec","`",".",":","return",":","The","formatted","path","obtained","by","replacing","the","``","prefix","placeholder","``","in","the","specified","``","path_spec","``","with","the","specified","``","replacement_path","``","."]
code: def _get_formatted_path(
      self,
      path_spec: str,
      prefix_placeholder: str,
      replacement_path: 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`.
      :param prefix_placeholder: The prefix placeholder, which is present at the beginning of
                                 `path_spec`. Either `prp` or `exe`.
      :param replacement_path: The path to use to replace the specified `prefix_placeholder`
                               in the specified `path_spec`.
      :return: The formatted path obtained by replacing the ``prefix placeholder`` in the
               specified ``path_spec`` with the specified ``replacement_path``.
      """
      subpath = pathlib.PurePosixPath(
          path_spec.split(prefix_placeholder)[1]
      )
      recipe_root_posix_path = pathlib.PurePosixPath(
          pathlib.Path(replacement_path).as_posix()
      )
      full_formatted_path = recipe_root_posix_path / subpath
      return str(full_formatted_path)
  
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 2 for calling the _MakefilePathFormat obj's underlying member method code with example usage: obj._get_formatted_path(path_spec, prefix_placeholder, replacement_path) and returns: str