def _read(self, **kwargs):
if re.match("<STR_LIT>", version.openjpeg_version):<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>raise TypeError(msg.format(version=version.openjpeg_version))<EOL><DEDENT>if version.openjpeg_version_tuple[<NUM_LIT:0>] < <NUM_LIT:2>:<EOL><INDENT>img = self._read_openjpeg(**kwargs)<EOL><DEDENT>else:<EOL><INDENT>img = self._read_openjp2(**kwargs)<EOL><DEDENT>return img<EOL>
Read a JPEG 2000 image.

        Returns
        -------
        ndarray
            The image data.

        Raises
        ------
        RuntimeError
            if the proper version of the OpenJPEG library is not available