<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def open_image(fname_or_instance: Union[str, IO[bytes]]):
 """Opens a Image and returns it. :param fname_or_instance: Can either be the location of the image as a string or the Image.Image instance itself. """

    if isinstance(fname_or_instance, Image.Image):
        return fname_or_instance

    return Image.open(fname_or_instance)