def _raise_on_bad_representation(representation):
        """Ensure that representation is a known Stanford Dependency
        representation (raises a ValueError if the representation is
        invalid)."""
        if representation not in REPRESENTATIONS:
            repr_desc = ', '.join(map(repr, REPRESENTATIONS))
            raise ValueError("Unknown representation: %r (should be one "
                             "of %s)" % (representation, repr_desc))