def _set_italian_leading_zeros_for_phone_number(national_number, numobj):
 if ((len(national_number) > 1) and (national_number[0] == U_ZERO)):
  numobj.italian_leading_zero = True
  number_of_leading_zeros = 1
  while ((number_of_leading_zeros < (len(national_number) - 1)) and (national_number[number_of_leading_zeros] == U_ZERO)):
   number_of_leading_zeros += 1
  if (number_of_leading_zeros != 1):
   numobj.number_of_leading_zeros = number_of_leading_zeros

def _set_italian_leading_zeros_for_phone_number ( national_number , numobj ) : if ( ( len ( national_number ) > 1 ) and ( national_number [ 0 ] == U_ZERO ) ) : numobj . italian_leading_zero = True number_of_leading_zeros = 1 while ( ( number_of_leading_zeros < ( len ( national_number ) - 1 ) ) and ( national_number [ number_of_leading_zeros ] == U_ZERO ) ) : number_of_leading_zeros += 1 if ( number_of_leading_zeros != 1 ) : numobj . number_of_leading_zeros = number_of_leading_zeros
a helper function to set the values related to leading zeros in a phonenumber .