def METHOD_NAME(username, password):
    import os
    c = omero.client(
        pmap=['--Ice.Config=' + (os.environ.get("ICE_CONFIG"))])
    host = c.ic.getProperties().getProperty('omero.host')
    port = int(c.ic.getProperties().getProperty('omero.port'))
    omero.client(host=host, port=port)
    sf = c.createSession(username, password)
    sf.getAdminService().getEventContext()
    c.closeSession()