(domain, start, end, *args)
return set(user_ids), form_users, sms_users
Returns the number of mobile users who have submitted a form or SMS in the
    time specified
Returns the number of mobile users who have submitted a form or SMS in the
    time specified
Returns the number of mobile users who have submitted a form or SMS in the time specified
def active_mobile_users(domain, start, end, *args):
    """
    Returns the number of mobile users who have submitted a form or SMS in the
    time specified
    """

    user_ids = get_mobile_users(domain.name)

    form_users = (FormES(es_instance_alias=ES_EXPORT_INSTANCE)
                  .domain(domain.name)
                  .user_aggregation()
                  .submitted(gte=start, lt=end)
                  .user_id(user_ids)
                  .size(0)
                  .run()
                  .aggregations.user.counts_by_bucket())

    sms_users = set(
        SMSES(es_instance_alias=ES_EXPORT_INSTANCE)
        .incoming_messages()
        .user_aggregation()
        .to_commcare_user()
        .domain(domain.name)
        .received(gte=start, lt=end)
        .size(0)
        .run()
        .aggregations.user.keys
    )

    return set(user_ids), form_users, sms_users
def active_mobile_users ( domain , start , end , * args ) : user_ids = get_mobile_users ( domain . name ) form_users = ( FormES ( es_instance_alias = ES_EXPORT_INSTANCE ) . domain ( domain . name ) . user_aggregation ( ) . submitted ( gte = start , lt = end ) . user_id ( user_ids ) . size ( 0 ) . run ( ) . aggregations . user . counts_by_bucket ( ) ) sms_users = set ( SMSES ( es_instance_alias = ES_EXPORT_INSTANCE ) . incoming_messages ( ) . user_aggregation ( ) . to_commcare_user ( ) . domain ( domain . name ) . received ( gte = start , lt = end ) . size ( 0 ) . run ( ) . aggregations . user . keys ) return set ( user_ids ) , form_users , sms_users