docs: def expected_peer_units():
      """Get a generator for units we expect to join peer relation based on
      goal-state.
  
      The local unit is excluded from the result to make it easy to gauge
      completion of all peers joining the relation with existing hook tools.
  
      Example usage:
      log('peer {} of {} joined peer relation'
          .format(len(related_units()),
                  len(list(expected_peer_units()))))
  
      This function will raise NotImplementedError if used with juju versions
      without goal-state support.
  
      :returns: iterator
      :rtype: types.GeneratorType
      :raises: NotImplementedError
      """
      if not has_juju_version("2.4.0"):
          # goal-state first appeared in 2.4.0.
          raise NotImplementedError("goal-state")
      _goal_state = goal_state()
      return (key for key in _goal_state['units']
              if '/' in key and key != local_unit())