@register.filter<EOL>def format_phone_number(number):
if not isinstance(number, phonenumbers.PhoneNumber):<EOL><INDENT>number = phonenumbers.parse(number)<EOL><DEDENT>return phonenumbers.format_number(number, phonenumbers.PhoneNumberFormat.INTERNATIONAL)<EOL>
Formats a phone number in international notation.
:param number: str or phonenumber object
:return: str