def consistency(self, desired_version=None, include_package=False,<EOL>strictness=None):
keys_to_check = list(self.versions.keys())<EOL>if not include_package and '<STR_LIT>' in keys_to_check:<EOL><INDENT>keys_to_check.remove('<STR_LIT>')<EOL><DEDENT>if desired_version is None:<EOL><INDENT>try:<EOL><INDENT>desired_version = self.versions['<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>desired_version = self.versions[keys_to_check[<NUM_LIT:0>]]<EOL><DEDENT><DEDENT>if strictness is None:<EOL><INDENT>strictness = self.strictness<EOL><DEDENT>desired = self._version(desired_version, strictness)<EOL>error_keys = []<EOL>for key in keys_to_check:<EOL><INDENT>test = self._version(self.versions[key], strictness)<EOL>if test != desired:<EOL><INDENT>error_keys += [key]<EOL><DEDENT><DEDENT>msg = "<STR_LIT>"<EOL>for key in error_keys:<EOL><INDENT>msg += "<STR_LIT>".format(<EOL>d=str(desired),<EOL>v=str(self.versions[key]),<EOL>k=str(key)<EOL>)<EOL><DEDENT>return msg<EOL>
Checks that the versions are consistent

        Parameters
        ----------
        desired_version: str
            optional; the version that all of these should match
        include_package: bool
            whether to check the special 'package' version for consistency
            (default False)
        strictness: str