def extract_mesh_descriptor_id(descriptor_id_str: str) -> int:
    """ Converts descriptor ID strings (e.g. 'D000016') into a number ID (e.g. 16). """
    if len(descriptor_id_str) == 0:
        raise Exception("Empty descriptor ID")
    if descriptor_id_str[0] != "D":
        raise Exception("Expected descriptor ID to start with 'D', {}".format(descriptor_id_str))

    return int(descriptor_id_str[1:])