Section 54. The registration of a foreign limited partnership doing business in the commonwealth shall be cancelled in the manner and at such times as are provided in section ten except that the cancellation shall be signed by a general partner. A foreign limited partnership doing business in this commonwealth may withdraw from the commonwealth by submitting to the secretary of state a certificate of withdrawal, in such form as the secretary of state shall require, signed and sworn to by a general partner, stating:
(1) the name of the foreign limited partnership and, if different, the name under which it is registered and doing business in the commonwealth;
(2) the business address of its principal office;
(3) the business address of its principal office in the commonwealth, if any, and the name and business address of its resident agent in the commonwealth;
(4) that the foreign limited partnership is not doing business in the commonwealth; and
(5) that all taxes and fees owed the commonwealth have been paid or provided for.
The secretary of state shall examine and endorse his approval on the certificate of withdrawal if he determines that the certificate complies with this section. Upon such approval and payment of the required fee, the certificate of withdrawal shall be deemed to be filed with the secretary of state.