<commit_before>from osgeo import ogr, osr
import geojson as gj
from geomet import wkt as WKT

def verify_polygons(in_json):
    if not in_json:
        raise AssertionError('JSON input is empty.')

    try:
        loaded_json = gj.loads(in_json)
    except Exception as e:
        raise AssertionError('Invalid JSON input.\n  ERROR MESSAGE: {}.'.format(e))

    validation = gj.is_valid(loaded_json)
    if validation['valid'].lower() != 'yes':
        raise AssertionError('ERROR MESSAGE: {}'.format(validation['message']))

    for feature in loaded_json['features']:
        geom_type = feature['geometry']['type']<commit_msg>changed validation logic after trouble with input GeoJSON types<commit_after>from osgeo import ogr, osr
import geojson as gj
from geomet import wkt as WKT

def verify_polygons(in_json):

    if not in_json:
        raise ValueError('JSON input is empty.')

    loaded_json = gj.loads(in_json)

    if not 'features' in loaded_json.keys():
        raise ValueError('JSON input must contain features property')

    for feature in loaded_json['features']:
        geom_type = feature['geometry']['type']
{'fraction_non_alphanumeric': 0.10344827586206896, 'fraction_numerical': 0.0, 'mean_word_length': 3.7563025210084033, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2123753', 'n_tokens_mistral': 346, 'n_tokens_neox': 330, 'n_words': 106}