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 a country doesn't use a national prefix, and this number doesn't have
    # an Italian leading zero, we assume it is a closed dialling plan with no
    # area codes.
    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)
Create or update a block device mapping in API cells.  If
dataset/ETHPy150Open daviddrysdale/python-phonenumbers/python/phonenumbers/phonenumberutil.py/length_of_geographical_area_code--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/cells/rpcapi.py/CellsAPI.bdm_update_or_create_at_top