def __getitem__(self, key):
        key = int(key)
        if key not in self._users:
            url = self.opener.base_url + USER_PATH.format(key)
            try:
                data = self.opener.open(url)
            except HTTPError as e:
                if e.code == 404:
                    self._users[key] = None
                else:
                    raise
            else:
                props = etree.parse(data).xpath('.//m:properties/*',
                                                namespaces=namespaces)
                self._users[key] = SharePointUser(key, props)
        if self._users[key] is None:
            raise KeyError(key)
        return self._users[key]
dataset/ETHPy150Open ox-it/python-sharepoint/sharepoint/users.py/SharePointUsers.__getitem__/original