def METHOD_NAME(im: str):
    assert isinstance(im, str)
    if os.path.isfile(im):
        img = np.array(Image.open(im).convert("RGB"))
    else:
        img = get_image_from_url(im)
        assert img is not None, f"could not connect to: {im}"
    return img