Check if a given context exists.

def context_exists(self, name):
        """Check if a given context exists."""
        contexts = self.data['contexts']
        for context in contexts:
            if context['name'] == name:
                return True
        return False