networking developed in earlier and have been put in module to make them easy to reuse in different programs as convenience for userswe keep track of the last license they entered so that it can be used as the defaultsince most commands start by asking for the license of the relevant car once the user makes choice we call the corresponding function passing in the previous licenseand expecting each function to return the license it used since the loop is infinite the program must be terminated by one of the functionswe will see this further on def get_car_details(previous_license)licensecar retrieve_car_details(previous_licenseif car is not noneprint("license{ }\nseats{seats}\nmileage{mileage}\ "owner{owner}format(license**car _asdict())return license this function is used to get information about particular car since most of the functions need to request license from the user and often need some car-related data to work onwe have factored out this functionality into the retrieve_car_details(function--it returns -tuple of the license entered by the user and named tuplecartuplethat holds the car' seatsmileageand owner (or the previous license and none if they entered an unrecognized licensehere we just print the information retrieved and return the license to be used as the default for the next function that is called and that needs the license def retrieve_car_details(previous_license)license console get_string("license""license"previous_licenseif not licensereturn previous_licensenone license license upper(ok*data handle_request("get_car_details"licenseif not okprint(data[ ]return previous_licensenone return licensecartuple(*datathis is the first function to make use of networking it calls the handle_request(function that we review further on the handle_request(function takes whatever data it is given as arguments and sends it to the serverand then returns whatever the server replies the handle_request(function does not know or care what data it sends or returnsit purely provides the networking service