docs: def _add_or_remove_flag(self, flag, add):
          """
          Add the given `flag` if `add` is True, remove it otherwise.
          """
          meth = self.add_flag if add else self.remove_flag
          meth(flag)