<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def inspect_requests(self, name=None, timeout=None):
 """Inspect all or one requests on the device. Update requests index. Parameters name : str or None, optional Name of the request or None to get all requests. timeout : float or None, optional Timeout for request inspection, None for no timeout Returns ------- Tornado future that resolves with: changes : :class:`~katcp.core.AttrDict` AttrDict with keys ``added`` and ``removed`` (of type :class:`set`), listing the requests that have been added or removed respectively. Modified requests are listed in both. If there are no changes, returns ``None`` instead. Example structure: {'added': set(['req1', 'req2']), 'removed': set(['req10', 'req20'])} """

        maybe_timeout = future_timeout_manager(timeout)
        if name is None:
            msg = katcp.Message.request('help')
        else:
            msg = katcp.Message.request('help', name)
        reply, informs = yield self.katcp_client.future_request(
            msg, timeout=maybe_timeout.remaining())
        if not reply.reply_ok():
            # If an unknown request is specified the desired result is to return
            # an empty list even though the request will fail
            if name is None or 'Unknown request' not in reply.arguments[1]:
                raise SyncError(
                    'Error reply during sync process for {}: {}'
                    .format(self.bind_address_string, reply))

        # Get recommended timeouts hints for slow requests if the server
        # provides them
        timeout_hints_available = (
            self.katcp_client.protocol_flags.request_timeout_hints)
        if timeout_hints_available:
            timeout_hints = yield self._get_request_timeout_hints(
                name, timeout=maybe_timeout.remaining())
        else:
            timeout_hints = {}

        requests_old = set(self._requests_index.keys())
        requests_updated = set()
        for msg in informs:
            req_name = msg.arguments[0]
            req = {'name': req_name,
                   'description': msg.arguments[1],
                   'timeout_hint': timeout_hints.get(req_name)}
            requests_updated.add(req_name)
            self._update_index(self._requests_index, req_name, req)

        added, removed = self._difference(
            requests_old, requests_updated, name, self._requests_index)
        if added or removed:
            raise Return(AttrDict(added=added, removed=removed))