from pathlib import Path


def get_y_Path(x):
    """Get label path from dicom path"""

    if isinstance(x, str):
        x = Path(x)

    y = str(x.absolute()).replace("DICOM_anon", "Ground")
    y = y.replace(".dcm", ".png")
    y = Path(y)

    return y