Section 3. Any such board may locate public parks within its city or town and for that purpose may take in fee by eminent domain under chapter seventy-nine or by purchase, gift, devise or otherwise, land which it considers desirable therefor, or may take bonds for the conveyance thereof to its city or town, but any such taking by eminent domain or by purchase shall be subject to the provisions of section fourteen of chapter forty. A city or town may take and hold in trust or otherwise any grant, gift, bequest or devise, made for the purpose of laying out or improving any parks therein.