def METHOD_NAME(self):
    config = self.document.settings.env.config
    global_substitutions = config['global_substitutions']
    to_handle = set(global_substitutions.keys()) - set(self.document.substitution_defs)
    for ref in self.document.traverse(nodes.substitution_reference):
        refname = ref['refname']
        if refname in to_handle:
            try:
                text = str(global_substitutions[refname])
                ref.replace_self(nodes.Text(text, text))
            except:
                pass