def METHOD_NAME(self, version):
    if not self.allowed_versions:
        return True
    return ((version is not None and version == self.default_version) or
            (version in self.allowed_versions))