Sets the current global context dictionary. All the attributes to be set
    should be set. Otherwise, it will result in unpredictable behavior.

def set_context(context):
    """Sets the current global context dictionary. All the attributes to be set
    should be set. Otherwise, it will result in unpredictable behavior."""
    global _context
    _context = {k: v for k, v in context.items()}