<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_resources(self, device_id):
 """List all resources registered to a connected device. .. code-block:: python print(r.name, r.observable, r.uri) None,True,/3/0/1 Update,False,/5/0/3 :param str device_id: The ID of the device (Required) :returns: A list of :py:class:`Resource` objects for the device :rtype: list """

        api = self._get_api(mds.EndpointsApi)
        return [Resource(r) for r in api.get_endpoint_resources(device_id)]