def _number_desc_for_type(metadata, num_type):
 if (num_type == PhoneNumberType.PREMIUM_RATE):
  return metadata.premium_rate
 elif (num_type == PhoneNumberType.TOLL_FREE):
  return metadata.toll_free
 elif (num_type == PhoneNumberType.MOBILE):
  return metadata.mobile
 elif ((num_type == PhoneNumberType.FIXED_LINE) or (num_type == PhoneNumberType.FIXED_LINE_OR_MOBILE)):
  return metadata.fixed_line
 elif (num_type == PhoneNumberType.SHARED_COST):
  return metadata.shared_cost
 elif (num_type == PhoneNumberType.VOIP):
  return metadata.voip
 elif (num_type == PhoneNumberType.PERSONAL_NUMBER):
  return metadata.personal_number
 elif (num_type == PhoneNumberType.PAGER):
  return metadata.pager
 elif (num_type == PhoneNumberType.UAN):
  return metadata.uan
 elif (num_type == PhoneNumberType.VOICEMAIL):
  return metadata.voicemail
 else:
  return metadata.general_desc

def _number_desc_for_type ( metadata , num_type ) : if ( num_type == PhoneNumberType . PREMIUM_RATE ) : return metadata . premium_rate elif ( num_type == PhoneNumberType . TOLL_FREE ) : return metadata . toll_free elif ( num_type == PhoneNumberType . MOBILE ) : return metadata . mobile elif ( ( num_type == PhoneNumberType . FIXED_LINE ) or ( num_type == PhoneNumberType . FIXED_LINE_OR_MOBILE ) ) : return metadata . fixed_line elif ( num_type == PhoneNumberType . SHARED_COST ) : return metadata . shared_cost elif ( num_type == PhoneNumberType . VOIP ) : return metadata . voip elif ( num_type == PhoneNumberType . PERSONAL_NUMBER ) : return metadata . personal_number elif ( num_type == PhoneNumberType . PAGER ) : return metadata . pager elif ( num_type == PhoneNumberType . UAN ) : return metadata . uan elif ( num_type == PhoneNumberType . VOICEMAIL ) : return metadata . voicemail else : return metadata . general_desc
return the phonenumberdesc of the metadata for the given number type .