def METHOD_NAME(self, got):
    """
    Raise an ``OtterRuntimeError`` if the assignment name of the notebook is invalid.
    If no assignment name was provided in the configurations, no action is taken.
    Args:
        got (``str | None``): the assignment name of the submission or ``None`` if it didn't
            have one
    Raises:
        ``otter.run.run_autograder.utils.OtterRuntimeError``: if the name is invalid and
            grading should be aborted
    """
    if self.ag_config.assignment_name and got != self.ag_config.assignment_name:
        message = f"Received submission for assignment '{got}' (this is assignment " \
            f"'{self.ag_config.assignment_name}')"
        raise OtterRuntimeError(message)