def molconvert_chemaxon(data):
if isinstance(data, Path):<EOL><INDENT>with data.open('<STR_LIT:rb>') as f:<EOL><INDENT>data = f.read()<EOL><DEDENT><DEDENT>elif isinstance(data, StringIO):<EOL><INDENT>data = data.read().encode()<EOL><DEDENT>elif isinstance(data, BytesIO):<EOL><INDENT>data = data.read()<EOL><DEDENT>elif hasattr(data, '<STR_LIT>'):  <EOL><INDENT>data = data.read()<EOL>if isinstance(data, str):<EOL><INDENT>data = data.encode()<EOL><DEDENT><DEDENT>elif isinstance(data, str):<EOL><INDENT>data = data.encode()<EOL><DEDENT>elif not isinstance(data, bytes):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>try:<EOL><INDENT>p = run(['<STR_LIT>', '<STR_LIT>', '<STR_LIT>'], input=data, stdout=PIPE)<EOL><DEDENT>except FileNotFoundError as e:<EOL><INDENT>raise ConfigurationError from e<EOL><DEDENT>if p.returncode != <NUM_LIT:0>:<EOL><INDENT>raise ConfigurationError(p.stderr.decode())<EOL><DEDENT>with BytesIO(p.stdout) as f, MRVread(f) as r:<EOL><INDENT>return iter2array(r)<EOL><DEDENT>
molconvert wrapper
:param data: buffer or string or path to file
:return: array of molecules of reactions