def createPackage(self, order_bin, address): """ Creates a new Package object containing the contents of order_bin to be shipped to an address Args: order_bin: A Bin object containing all of needed Item objects to complete an Order address: A string representing the address this new package will be sent to Returns: package: A Package object containing all of the Item objects """ package = Package() package.setDestination(address) for item in order_bin.getContents(): package.addToPackage(item) return package