import pathlib


def get_mlflow_artifacts_path(client, run_id):
    """Get path to where the artifacts are located.

    The benefit is that we can log any file into it and even
    create a custom folder hierarachy.

    Parameters
    ----------
    client : mlflow.tracking.MlflowClient
        Client.

    run_id : str
        Unique identifier of a run.

    Returns
    -------
    path : pathlib.Path
        Path to the root folder of artifacts.
    """
    artifacts_uri = client.get_run(run_id).info.artifact_uri
    path_str = artifacts_uri.partition("file:")[2]
    path = pathlib.Path(path_str)

    return path