docs: def single_or_default(self, default, predicate=None):
          '''The only element (which satisfies a condition) or a default.
  
          If the predicate is omitted or is None this query returns the only
          element in the sequence; otherwise, it returns the only element in
          the sequence for which the predicate evaluates to True. A default value
          is returned if there is no such element. An exception is raised if
          there is more than one such element.
  
          Note: This method uses immediate execution.
  
          Args:
              default: The value which will be returned if either the sequence is
                  empty or there are no elements matching the predicate.
  
              predicate: An optional unary predicate function, the only argument
                  to which is the element. The return value should be True for
                  matching elements, otherwise False.  If the predicate is
                  omitted or None the only element of the source sequence will
                  be returned.
  
          Returns:
              The only element of the sequence if predicate is None, otherwise
              the only element for which the predicate returns True. If there are
              no such elements the default value will returned.
  
          Raises:
              ValueError: If the Queryable is closed.
              ValueError: If, when predicate is None the source sequence contains
                  more than one element.
              ValueError: If there is more then one element matching the
                  predicate.
              TypeError: If the predicate is not callable.
          '''
          if self.closed():
              raise ValueError("Attempt to call single_or_default() on a closed Queryable.")
  
          return self._single_or_default(default) if predicate is None else self._single_or_default_predicate(default, predicate)