from pathlib import Path


def image_path(sample, camera="center"):
    """ Transform the sample path to the repository structure.

    Args:
        sample: a sample (row) of the data dataframe. Usually drawn of a batch
         by the generator
        camera: the camera to extract the path for
    Returns:
        the converted image path string
    """
    return str(Path(f"./data/{sample[camera].split('data')[-1]}"))