def METHOD_NAME(cls, image_data: Union[str, pathlib.PosixPath]) -> PILImage:
    """Given a str, which we assume to be a path to an image on disk, or a Pathlib object,
    try to load it as a PIL image.
    Args:
        image_data: Union[pathlib.PosixPath, str]
            Path to be loaded.
    Returns:
        PIL.Image.Image
            PIL image representation of the image loaded from disk.
    """
    if isinstance(image_data, str) and not os.path.isfile(image_data):
        error(
            "<COR14433331E>",
            FileNotFoundError(f"Provided path [{image_data}] is not a file"),
        )
    elif isinstance(image_data, pathlib.PosixPath) and not image_data.is_file():
        error(
            "<COR14499831E>",
            FileNotFoundError(f"Provided pathlib [{image_data}] is not a file"),
        )
    return PILImage.open(image_data)