code: def getPrintAddress(self):
          
          address_lines = []
  
          addresses = [
              self.getPostalAddress(),
              self.getPhysicalAddress(),
              self.getBillingAddress(),
          ]
  
          for address in addresses:
              city = address.get("city", "")
              zip = address.get("zip", "")
              state = address.get("state", "")
              country = address.get("country", "")
  
              if city:
                  address_lines = [
                      address["address"].strip(),
                      "{} {}".format(city, zip).strip(),
                      "{} {}".format(state, country).strip(),
                  ]
                  break
  
          return address_lines
docs: Get an address for printing