<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean_text(self, number, countries=None, country=None, **kwargs):
 """Parse a phone number and return in international format. If no valid phone number can be detected, None is returned. If a country code is supplied, this will be used to infer the prefix. https://github.com/daviddrysdale/python-phonenumbers """

        for code in self._clean_countries(countries, country):
            try:
                num = parse_number(number, code)
                if is_possible_number(num):
                    if is_valid_number(num):
                        return format_number(num, PhoneNumberFormat.E164)
            except NumberParseException:
                pass