def validate_user_access_to_subscribers(user_profile: Optional[UserProfile], stream: Stream) -> None:
    ' Validates whether the user can view the subscribers of a stream.  Raises a JsonableError if:\n        * The user and the stream are in different realms\n        * The realm is MIT and the stream is not invite only.\n        * The stream is invite only, requesting_user is passed, and that user\n          does not subscribe to the stream.\n    '
    validate_user_access_to_subscribers_helper(user_profile, {'realm_id': stream.realm_id, 'invite_only': stream.invite_only}, (lambda user_profile: subscribed_to_stream(user_profile, stream.id)))
Validates whether the user can view the subscribers of a stream.  Raises a JsonableError if:
* The user and the stream are in different realms
* The realm is MIT and the stream is not invite only.
* The stream is invite only, requesting_user is passed, and that user
  does not subscribe to the stream.
def validate_user_access_to_subscribers(user_profile: Optional[UserProfile], stream: Stream) -> None:
    ' Validates whether the user can view the subscribers of a stream.  Raises a JsonableError if:\n        * The user and the stream are in different realms\n        * The realm is MIT and the stream is not invite only.\n        * The stream is invite only, requesting_user is passed, and that user\n          does not subscribe to the stream.\n    '
    validate_user_access_to_subscribers_helper(user_profile, {'realm_id': stream.realm_id, 'invite_only': stream.invite_only}, (lambda user_profile: subscribed_to_stream(user_profile, stream.id)))