<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def logout(session_id, **kwargs):
 """ Logout a user, removing their cookie if it exists and returning 'OK' args: session_id (string):
 The session ID to identify the cookie to remove returns: 'OK' raises: HydraError if the logout fails """


    hydra_session_object = session.SessionObject({}, #This is normally a request object, but in this case is empty
            validate_key=config.get('COOKIES', 'VALIDATE_KEY', 'YxaDbzUUSo08b+'),
            type='file',
            cookie_expires=True,
            data_dir=config.get('COOKIES', 'DATA_DIR', '/tmp'),
            file_dir=config.get('COOKIES', 'FILE_DIR', '/tmp/auth'))

    hydra_session = hydra_session_object.get_by_id(session_id)

    if hydra_session is not None:
        hydra_session.delete()
        hydra_session.save()

    return 'OK'