def _extract_inventory(body, schema):
 data = util.extract_json(body, schema)
 inventory_data = copy.copy(INVENTORY_DEFAULTS)
 inventory_data.update(data)
 return inventory_data

def _extract_inventory ( body , schema ) : data = util . extract_json ( body , schema ) inventory_data = copy . copy ( INVENTORY_DEFAULTS ) inventory_data . update ( data ) return inventory_data
extract and validate inventory from json body .