<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def removefromreadergroup(self, groupname):
 """Remove a reader from a reader group"""


        hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER)
        if 0 != hresult:
            raise EstablishContextException(hresult)
        try:
            hresult = SCardRemoveReaderFromGroup(hcontext, self.name,
                groupname)
            if 0 != hresult:
                raise RemoveReaderFromGroupException(hresult, self.name,
                    groupname)
        finally:
            hresult = SCardReleaseContext(hcontext)
            if 0 != hresult:
                raise ReleaseContextException(hresult)