def METHOD_NAME(self, status: int, label: str, message: str, invalidates_cache: bool = False) -> None:
    """
    Add an exit code to the ProcessSpec
    :param status: the exit status integer
    :param label: a label by which the exit code can be addressed
    :param message: a more detailed description of the exit code
    :param invalidates_cache: when set to `True`, a process exiting
        with this exit code will not be considered for caching
    """
    if not isinstance(status, int):
        raise TypeError(f'status should be of integer type and not of {type(status)}')
    if status < 0:
        raise ValueError(f'status should be a positive integer, received {type(status)}')
    if not isinstance(label, str):
        raise TypeError(f'label should be of str type and not of {type(label)}')
    if not isinstance(message, str):
        raise TypeError(f'message should be of str type and not of {type(message)}')
    if not isinstance(invalidates_cache, bool):
        raise TypeError(f'invalidates_cache should be of type bool and not of {type(invalidates_cache)}')
    self._exit_codes[label] = ExitCode(status, message, invalidates_cache=invalidates_cache)