def make_caption(dataset, idx, prefix=''):
    """Make caption that tells scene directory and sample index.

    Paramters
    ---------
    dataset: BaseDataset
        BaseDataset. e.g. ParallelDomainScene(Dataset), SynchronizedScene(Dataset)
    idx: int
        Image index
    prefix: str
        Caption prefix

    Returns
    -------
    caption: str
        Caption of the image
    """
    scene_idx, frame_idx, _ = dataset.dataset_item_index[idx]
    scene_name = dataset.scenes[scene_idx].scene.name
    return "{:s}{:s} #{:d}".format(prefix, scene_name, frame_idx)