def is_public_stream(stream_name, realm):
 stream = get_stream(stream_name, realm)
 if (stream is None):
  return False
 return stream.is_public()

def is_public_stream ( stream_name , realm ) : stream = get_stream ( stream_name , realm ) if ( stream is None ) : return False return stream . is_public ( )
determine whether a stream is public .