def create_layer(number):
 file_list = glob.glob(('%s*.shp' % shp_path))
 random_index = randint(0, (len(file_list) - 1))
 file_uri = file_list[random_index]
 layer = file_upload(file_uri)
 assign_keywords(layer)
 resource = layer.get_self_resource()
 set_resource(resource)

def create_layer ( number ) : file_list = glob . glob ( ( '%s*.shp' % shp_path ) ) random_index = randint ( 0 , ( len ( file_list ) - 1 ) ) file_uri = file_list [ random_index ] layer = file_upload ( file_uri ) assign_keywords ( layer ) resource = layer . get_self_resource ( ) set_resource ( resource )
creates a new layer .