code: def mask_phone_number(number):
      
      if isinstance(number, phonenumbers.PhoneNumber):
          number = format_phone_number(number)
      return phone_mask.sub('*', number)
docs: Masks a phone number, only first 3 and last 2 digits visible.
  
      Examples:
  
      * `+31 * ******58`
  
      :param number: str or phonenumber object
      :return: str