def length_of_geographical_area_code(numobj):
 metadata = PhoneMetadata.metadata_for_region(region_code_for_number(numobj), None)
 if (metadata is None):
  return 0
 if ((metadata.national_prefix is None) and (not numobj.italian_leading_zero)):
  return 0
 if (not _is_number_geographical(numobj)):
  return 0
 return length_of_national_destination_code(numobj)

def length_of_geographical_area_code ( numobj ) : metadata = PhoneMetadata . metadata_for_region ( region_code_for_number ( numobj ) , None ) if ( metadata is None ) : return 0 if ( ( metadata . national_prefix is None ) and ( not numobj . italian_leading_zero ) ) : return 0 if ( not _is_number_geographical ( numobj ) ) : return 0 return length_of_national_destination_code ( numobj )
return length of the geographical area code for a number .