Validates marker name, raising error if invalid.

def _validate_marker_name(self, marker_name):
        """Validates marker name, raising error if invalid."""

        if marker_name not in self.valid_marker_names:
            raise InvalidMarkerNameError(
                "{} is not a valid marker name".format(marker_name)
            )

        return marker_name