def _validate(cmd, references):
    for match in TAG_RE.finditer(cmd):
        tag = match.group('tag')
        if tag not in references:
            raise TypeError("Tag %s not in reference mapping: %s" %
                            (tag, sorted(references.keys())))
Make sure all references in the command are in the reference mapping
dataset/ETHPy150Open glue-viz/glue/glue/core/parse.py/_validate