<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_capabilities(self, urn=None):
 """ Provisional route for GetCapabilities request :param urn: URN to filter the resource :param inv: Inventory Identifier :return: GetCapabilities response """

        r = self.resolver.getMetadata(objectId=urn)
        if len(r.parents) > 0:
            r = r.parents[-1]
        r = render_template(
            "cts/GetCapabilities.xml",
            filters="urn={}".format(urn),
            inventory=Markup(r.export(Mimetypes.XML.CTS))
        )
        return r, 200, {"content-type": "application/xml"}