(cls, phone_number)
Used to lookup a two-way PhoneNumber, trying to exclude country code digits.

        Decided not to cache this method since in order to clear the cache
        we'd have to clear using all suffixes of a number (which would involve
        up to ~10 cache clear calls on each save). Since this method is used so
        infrequently, it's better to not cache vs. clear so many keys on each
        save. Once all of our IVR gateways provide reliable caller id info,
        we can also remove this method.
Used to lookup a two-way PhoneNumber, trying to exclude country code digits.
Used to lookup a two - way PhoneNumber trying to exclude country code digits .
def get_two_way_number_by_suffix(cls, phone_number):
        """
        Used to lookup a two-way PhoneNumber, trying to exclude country code digits.

        Decided not to cache this method since in order to clear the cache
        we'd have to clear using all suffixes of a number (which would involve
        up to ~10 cache clear calls on each save). Since this method is used so
        infrequently, it's better to not cache vs. clear so many keys on each
        save. Once all of our IVR gateways provide reliable caller id info,
        we can also remove this method.
        """
        phone_number = apply_leniency(phone_number)
        try:
            return cls.objects.get(phone_number__endswith=phone_number, is_two_way=True)
        except cls.DoesNotExist:
            return None
        except cls.MultipleObjectsReturned:
            return None
def get_two_way_number_by_suffix ( cls , phone_number ) : phone_number = apply_leniency ( phone_number ) try : return cls . objects . get ( phone_number__endswith = phone_number , is_two_way = True ) except cls . DoesNotExist : return None except cls . MultipleObjectsReturned : return None