Calls a three-staged hook:
        
        1. ``"pre_"+name``
        2. ``"in_"+name``
        3. ``"post_"+name``

def trigger_staged_cg_hook(self, name, g, *args, **kwargs):
        """Calls a three-staged hook:
        
        1. ``"pre_"+name``
        2. ``"in_"+name``
        3. ``"post_"+name``
        
        """
        print_hooks = self._print_hooks
        # TODO: document name lookup business
        # TODO: refactor this context stuff, its confusing
        hook_name = "pre_" + name
        printed_name = hook_name if print_hooks else None
        self.trigger_cg_hook(hook_name, g, printed_name, *args, **kwargs) # TODO: avoid copies
        
        hook_name = "in_" + name
        printed_name = hook_name if print_hooks else None
        self.trigger_cg_hook(hook_name, g, printed_name, *args, **kwargs)
        
        hook_name = "post_" + name
        printed_name = hook_name if print_hooks else None
        self.trigger_cg_hook(hook_name, g, printed_name, *args, **kwargs)