<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resource_type(self, rt):
 """ Set the CoRE Link Format rt attribute of the resource. :param rt: the CoRE Link Format rt attribute """

        if not isinstance(rt, str):
            rt = str(rt)
        self._attributes["rt"] = rt