from pathlib import Path


def convert_to_valid_tracking_uri(mlflow_dir):
    """
    Converts from a windows path like 'C:/example/mlflow' to a valid mlflow tracking uri.
    """
    mlflow_dir = Path(mlflow_dir)
    tracking_uri = f"file:///{(mlflow_dir / 'mlruns').as_posix()}"
    return tracking_uri