<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _client_allowed(self):
 """Check if client is allowed to connect to this server."""

    client_ip = self._client_address[0]
    if not client_ip in self._settings.allowed_clients and \
       not 'ALL' in self._settings.allowed_clients:
      content = 'Access from host {} forbidden.'.format(client_ip).encode('utf-8')
      self._send_content(content, 'text/html')
      return False
    return True