def _dashboard_activity_query(user_id, limit):
 q1 = _user_activity_query(user_id, limit)
 q2 = _activities_from_everything_followed_by_user_query(user_id, limit)
 return _activities_union_all(q1, q2)

def _dashboard_activity_query ( user_id , limit ) : q1 = _user_activity_query ( user_id , limit ) q2 = _activities_from_everything_followed_by_user_query ( user_id , limit ) return _activities_union_all ( q1 , q2 )
return an sqlalchemy query for user_ids dashboard activity stream .