increase_stock (lambda selfidentityamountself __change_stock(identityamount)decrease_stock (lambda selfidentityamountself __change_stock(identity-amount)the private __change_stock(method provides an implementation for the increase_stock(and decrease_stock(methods the bike' index position is found and the raw binary record is retrieved then the data is converted to bikestock bike objectthe change is applied to the bikeand then the record in the file is overwritten with the binary representation of the updated bike object (there is also __change_bike(method that provides an implementation for the change_name(and change_price(methodsbut none of these are shown because they are very similar to what' shown here def __iter__(self)for index in range(len(self __file))record self __file[indexif record is not noneyield _bike_from_record(recordthis method ensures that bikestock bikestock objects can be iterated overjust like listwith bikestock bike object returned at each iterationand skipping blank and deleted records record record record recordn utf- encoded bytes utf- encoded bytes int float identity name quantity price figure the logical structure of bike record file the private _bike_from_record(and _record_from_bike(functions isolate the binary representation of the bikestock bike class from the bikestock bikestock class that holds collection of bikes the logical structure of bike record file is shown in figure the physical structure is slightly different because each record is preceded by state byte _bike_struct struct struct("< sid"def _bike_from_record(record)idnamequantityprice range( parts list(_bike_struct unpack(record)parts[idparts[iddecode("utf "rstrip("\ "parts[nameparts[namedecode("utf "rstrip("\ "