def type_rank(hierarchy, feature_type):
    """Return rank or code 1000 if feature_type not found."""
    if feature_type in hierarchy:
        return hierarchy[feature_type]["rank"]
    else:
        return 1000