def METHOD_NAME(self, domain):
    date_of_inactivity = datetime.datetime.utcnow() - datetime.timedelta(
        days=self.inactivity_period
    )
    user_query = (
        UserES()
        .domain(domain)
        .mobile_users()
        .is_active()
        .created(lte=date_of_inactivity)
        .filter(
            filters.OR(
                filters.date_range(
                    "reporting_metadata.last_submission_for_user.submission_date",
                    lte=date_of_inactivity
                ),
                filters.missing(
                    "reporting_metadata.last_submission_for_user.submission_date"
                )
            )
        )
        .source(['_id'])
    )
    user_ids = [u['_id'] for u in user_query.run().hits]
    for chunked_ids in chunked(user_ids, 100):
        bulk_auto_deactivate_commcare_users(chunked_ids, domain)