def cellmlToSBML(cellml): """ Convert CellML to SBML string. :param cellml: CellML string or file :type cellml: str | file :return: SBML :rtype: str """ if os.path.isfile(cellml): code = antimony.loadCellMLFile(cellml) else: code = antimony.loadCellMLString(cellml) _checkAntimonyReturnCode(code) return antimony.getSBMLString(None)