def format_status(self, invitation):
        if invitation.status == SelfRegistrationInvitation.STATUS_REGISTERED:
            registered_date = (ServerTime(invitation.registered_date)
                               .user_time(self.project_timezone)
                               .done()
                               .strftime(SERVER_DATETIME_FORMAT))
            return _("Registered on %(date)s") % {'date': registered_date}
        else:
            return {
                SelfRegistrationInvitation.STATUS_PENDING: _("Pending"),
                SelfRegistrationInvitation.STATUS_EXPIRED: _("Expired"),
            }.get(invitation.status)
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/sms/views.py/ManageRegistrationInvitationsView.format_status/original