def validate(<EOL>self, nanopub: Mapping[str, Any]<EOL>) -> Tuple[bool, List[Tuple[str, str]]]:
<EOL>(is_valid, messages) = validate_to_schema(nanopub, self.nanopub_schema)<EOL>if not is_valid:<EOL><INDENT>return messages<EOL><DEDENT>if nanopub["<STR_LIT>"]["<STR_LIT:type>"]["<STR_LIT:name>"].upper() == "<STR_LIT>":<EOL><INDENT>bel_version = nanopub["<STR_LIT>"]["<STR_LIT:type>"]["<STR_LIT:version>"]<EOL><DEDENT>else:<EOL><INDENT>is_valid = False<EOL>return (<EOL>is_valid,<EOL>f"<STR_LIT>",<EOL>)<EOL><DEDENT>all_messages = []<EOL>bel_obj = bel.lang.belobj.BEL(bel_version, self.endpoint)<EOL>for edge in nanopub["<STR_LIT>"]["<STR_LIT>"]:<EOL><INDENT>bel_statement = f"<STR_LIT>"<EOL>parse_obj = bel_obj.parse(bel_statement)<EOL>if not parse_obj.valid:<EOL><INDENT>all_messages.extend(<EOL>(<EOL>"<STR_LIT>",<EOL>f"<STR_LIT>",<EOL>)<EOL>)<EOL><DEDENT><DEDENT>for context in nanopub["<STR_LIT>"]["<STR_LIT>"]:<EOL><INDENT>(is_valid, messages) = self.validate_context(context)<EOL>all_messages.extend(messages)<EOL><DEDENT>is_valid = True<EOL>for _type, msg in all_messages:<EOL><INDENT>if _type == "<STR_LIT>":<EOL><INDENT>is_valid = False<EOL><DEDENT><DEDENT>return (is_valid, all_messages)<EOL>
Validates using the nanopub schema

        Args:
            nanopub (Mapping[str, Any]): nanopub dict

        Returns:
            Tuple[bool, List[Tuple[str, str]]]:
                bool: Is valid?  Yes = True, No = False
                List[Tuple[str, str]]: Validation issues, empty if valid, tuple is ('ERROR|WARNING', msg)
                    e.g. [('WARNING', "Context ID not found")]