Section 27. If an inpatient or resident of any facility dies leaving an estate which does not exceed five thousand dollars in value, the superintendent shall notify the nearest living relative of such inpatient or resident of such fact, and if, after the expiration of thirty days from the date of such notice, no petition for administration of said estate has been filed, the department may provide for the administration of said estate under the provisions of section sixteen of chapter one hundred and ninety-five.